Search in sources :

Example 1 with EventHandlerInterface

use of com.mvp4g.client.event.EventHandlerInterface in project mvp4g by mvp4g.

the class PresenterTest method testSetter.

@Test
public void testSetter() {
    String view = "View";
    BaseEventBus bus = new BaseEventBus() {

        @Override
        protected <T extends EventHandlerInterface<?>> T createHandler(Class<T> handlerClass) {
            return null;
        }

        public void setApplicationHistoryStored(boolean historyStored) {
        }

        public void setNavigationConfirmation(NavigationConfirmationInterface navigationConfirmation) {
        }

        public void confirmNavigation(NavigationEventCommand event) {
        }
    };
    presenter.setEventBus(bus);
    presenter.setView(view);
    assertSame(presenter.getView(), view);
    assertSame(presenter.getEventBus(), bus);
}
Also used : NavigationEventCommand(com.mvp4g.client.history.NavigationEventCommand) BaseEventBus(com.mvp4g.client.event.BaseEventBus) EventHandlerInterface(com.mvp4g.client.event.EventHandlerInterface) NavigationConfirmationInterface(com.mvp4g.client.history.NavigationConfirmationInterface) Test(org.junit.Test)

Aggregations

BaseEventBus (com.mvp4g.client.event.BaseEventBus)1 EventHandlerInterface (com.mvp4g.client.event.EventHandlerInterface)1 NavigationConfirmationInterface (com.mvp4g.client.history.NavigationConfirmationInterface)1 NavigationEventCommand (com.mvp4g.client.history.NavigationEventCommand)1 Test (org.junit.Test)1