Search in sources :

Example 6 with StartElement

use of com.mvp4g.rebind.config.element.StartElement in project mvp4g by mvp4g.

the class Mvp4gConfigurationTest method testForwardOk.

@Test
public void testForwardOk() throws InvalidMvp4gConfigurationException {
    configuration.setModule(oracle.addClass(Modules.Module01.class));
    EventElement e = newEvent("forward");
    events.add(e);
    StartElement start = configuration.getStart();
    start.setForwardEventType("forward");
    setEventBus();
    JClassType parentEventBus = oracle.addClass(EventBus.class);
    configuration.setParentEventBus(parentEventBus);
    configuration.validateEvents();
}
Also used : StartElement(com.mvp4g.rebind.config.element.StartElement) JClassType(com.google.gwt.core.ext.typeinfo.JClassType) EventElement(com.mvp4g.rebind.config.element.EventElement) Test(org.junit.Test)

Example 7 with StartElement

use of com.mvp4g.rebind.config.element.StartElement in project mvp4g by mvp4g.

the class Mvp4gConfigurationTest method setUp.

@Before
public void setUp() {
    GeneratorContextStub context = new GeneratorContextStub();
    builder = new UnitTestTreeLogger.Builder();
    logger = builder.createLogger();
    oracle = context.getTypeOracleStub();
    // oracle.addClass( SimpleView01.class );
    configuration = new Mvp4gConfiguration(logger, context);
    presenters = configuration.getPresenters();
    views = configuration.getViews();
    events = configuration.getEvents();
    services = configuration.getServices();
    historyConverters = configuration.getHistoryConverters();
    childModules = configuration.getChildModules();
    eventHandlers = configuration.getEventHandlers();
    eventFilters = configuration.getEventFilters();
    configuration.setStart(new StartElement());
    configuration.setHistory(new HistoryElement());
    configuration.setModule(oracle.addClass(Mvp4gModule.class));
}
Also used : StartElement(com.mvp4g.rebind.config.element.StartElement) HistoryElement(com.mvp4g.rebind.config.element.HistoryElement) GeneratorContextStub(com.mvp4g.rebind.test_tools.GeneratorContextStub) Mvp4gModule(com.mvp4g.client.Mvp4gModule) UnitTestTreeLogger(com.google.gwt.dev.util.UnitTestTreeLogger) Before(org.junit.Before)

Aggregations

StartElement (com.mvp4g.rebind.config.element.StartElement)7 Test (org.junit.Test)6 JClassType (com.google.gwt.core.ext.typeinfo.JClassType)3 EventElement (com.mvp4g.rebind.config.element.EventElement)3 HistoryElement (com.mvp4g.rebind.config.element.HistoryElement)3 InvalidMvp4gConfigurationException (com.mvp4g.rebind.exception.InvalidMvp4gConfigurationException)3 Mvp4gModule (com.mvp4g.client.Mvp4gModule)2 EventBusElement (com.mvp4g.rebind.config.element.EventBusElement)2 OneObject (com.mvp4g.rebind.test_tools.OneObject)2 UnitTestTreeLogger (com.google.gwt.dev.util.UnitTestTreeLogger)1 ChildModulesElement (com.mvp4g.rebind.config.element.ChildModulesElement)1 DebugElement (com.mvp4g.rebind.config.element.DebugElement)1 EventFiltersElement (com.mvp4g.rebind.config.element.EventFiltersElement)1 GinModuleElement (com.mvp4g.rebind.config.element.GinModuleElement)1 GeneratorContextStub (com.mvp4g.rebind.test_tools.GeneratorContextStub)1 Before (org.junit.Before)1