use of com.mvp4g.client.event.EventBus in project mvp4g by mvp4g.
the class Mvp4gConfigurationTest method testSplitterLoadersIncompatibleType.
@Test
public void testSplitterLoadersIncompatibleType() throws InvalidMvp4gConfigurationException {
EventBusElement eventBus = new EventBusElement(EventBus.class.getName(), BaseEventBus.class.getName(), false);
configuration.setEventBus(eventBus);
oracle.addClass(Loaders.Loader1.class);
oracle.addClass(Splitters.SplitterWithLoader.class);
PresenterElement presenter1 = newPresenter(SimplePresenter01.class, "presenter1");
presenter1.setAsync(Splitters.SplitterWithLoader.class.getCanonicalName());
presenters.add(presenter1);
EventElement event = new EventElement();
event.setHandlers(new String[] { "presenter1" });
configuration.getEvents().add(event);
try {
configuration.validateSplitters();
fail();
} catch (InvalidTypeException e) {
assertTrue(e.getMessage().contains("Can not convert " + EventBus.class.getCanonicalName()));
}
}
use of com.mvp4g.client.event.EventBus in project mvp4g by mvp4g.
the class Mvp4gConfigurationTest method testRemoveClearHistory.
@Test
public void testRemoveClearHistory() throws InvalidMvp4gConfigurationException {
HistoryConverterElement e = new HistoryConverterElement();
e.setClassName(ClearHistory.class.getCanonicalName());
historyConverters.add(e);
EventBusElement eventBus = new EventBusElement(EventBus.class.getName(), BaseEventBus.class.getName(), false);
configuration.setEventBus(eventBus);
configuration.validateHistoryConverters();
}
Aggregations