use of com.mvp4g.rebind.exception.InvalidTypeException 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()));
}
}
Aggregations