Search in sources :

Example 6 with SimpleView02

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();
}
Also used : SimpleView02(com.mvp4g.rebind.test_tools.annotation.views.SimpleView02) EventElement(com.mvp4g.rebind.config.element.EventElement) SimpleHistoryConverter01(com.mvp4g.rebind.test_tools.annotation.history_converters.SimpleHistoryConverter01) Test(org.junit.Test)

Example 7 with SimpleView02

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();
}
Also used : SimpleView02(com.mvp4g.rebind.test_tools.annotation.views.SimpleView02) HistoryConverterElement(com.mvp4g.rebind.config.element.HistoryConverterElement) InjectedElement(com.mvp4g.rebind.config.element.InjectedElement) SimpleHistoryConverter01(com.mvp4g.rebind.test_tools.annotation.history_converters.SimpleHistoryConverter01) SimplePresenter01(com.mvp4g.rebind.test_tools.annotation.presenters.SimplePresenter01) Test(org.junit.Test)

Aggregations

SimpleView02 (com.mvp4g.rebind.test_tools.annotation.views.SimpleView02)7 Test (org.junit.Test)7 EventElement (com.mvp4g.rebind.config.element.EventElement)4 PresenterElement (com.mvp4g.rebind.config.element.PresenterElement)4 SimplePresenter01 (com.mvp4g.rebind.test_tools.annotation.presenters.SimplePresenter01)4 SimpleHistoryConverter01 (com.mvp4g.rebind.test_tools.annotation.history_converters.SimpleHistoryConverter01)3 InjectedElement (com.mvp4g.rebind.config.element.InjectedElement)2 ViewElement (com.mvp4g.rebind.config.element.ViewElement)2 BaseEventBus (com.mvp4g.client.event.BaseEventBus)1 EventBusWithLookup (com.mvp4g.client.event.EventBusWithLookup)1 EventBusElement (com.mvp4g.rebind.config.element.EventBusElement)1 EventHandlerElement (com.mvp4g.rebind.config.element.EventHandlerElement)1 HistoryConverterElement (com.mvp4g.rebind.config.element.HistoryConverterElement)1 InvalidMvp4gConfigurationException (com.mvp4g.rebind.exception.InvalidMvp4gConfigurationException)1 Presenters (com.mvp4g.rebind.test_tools.annotation.Presenters)1 SimpleView03 (com.mvp4g.rebind.test_tools.annotation.views.SimpleView03)1 SimpleView04 (com.mvp4g.rebind.test_tools.annotation.views.SimpleView04)1