use of com.mvp4g.rebind.test_tools.annotation.views.SimpleView02 in project mvp4g by mvp4g.
the class Mvp4gConfigurationTest method testEventHandlerValidationFails.
@Test(expected = UnknownConfigurationElementException.class)
public void testEventHandlerValidationFails() throws InvalidMvp4gConfigurationException {
views.add(newView(SimpleView02.class, "badHandler"));
services.add(newService("badHandler"));
events.add(newEvent("badHanlder"));
historyConverters.add(newHistoryConverter(SimpleHistoryConverter01.class, "badHanlder"));
EventElement event = newEvent("testEvent");
event.setHandlers(new String[] { "badHandler" });
events.add(event);
setEventBus();
configuration.validateEventHandlers();
}
use of com.mvp4g.rebind.test_tools.annotation.views.SimpleView02 in project mvp4g by mvp4g.
the class Mvp4gConfigurationTest method testInjectedServiceValidationFailsForHistoryConverter.
@Test(expected = UnknownConfigurationElementException.class)
public void testInjectedServiceValidationFailsForHistoryConverter() throws UnknownConfigurationElementException, InvalidTypeException, InvalidClassException, NotFoundClassException {
events.add(newEvent("badService"));
views.add(newView(SimpleView02.class, "badService"));
presenters.add(newPresenter(SimplePresenter01.class, "badService"));
historyConverters.add(newHistoryConverter(SimpleHistoryConverter01.class, "badService"));
HistoryConverterElement historyConverter = newHistoryConverter(SimpleHistoryConverter02.class, "testHistoryConverter");
historyConverter.getInjectedServices().add(new InjectedElement("badService", "setBadService"));
historyConverters.add(historyConverter);
configuration.validateServices();
}
Aggregations