use of com.mvp4g.rebind.config.element.DebugElement in project mvp4g by mvp4g.
the class Mvp4gConfigurationTest method testDebug.
@Test
public void testDebug() throws NotFoundClassException, InvalidTypeException {
DebugElement debug = new DebugElement();
oracle.addClass(OneObject.class);
debug.setLogger(OneObject.class.getCanonicalName());
configuration.setDebug(debug);
try {
configuration.validateDebug();
fail();
} catch (InvalidTypeException e) {
assertTrue(e.getMessage().contains(Mvp4gLogger.class.getCanonicalName()));
}
debug = new DebugElement();
oracle.addClass(DefaultMvp4gLogger.class);
debug.setLogger(DefaultMvp4gLogger.class.getCanonicalName());
configuration.setDebug(debug);
configuration.validateDebug();
configuration.setDebug(null);
configuration.validateDebug();
}
use of com.mvp4g.rebind.config.element.DebugElement in project mvp4g by mvp4g.
the class Mvp4gConfigurationTest method testSetterGetter.
@Test
public void testSetterGetter() {
StartElement start = new StartElement();
configuration.setStart(start);
assertSame(start, configuration.getStart());
HistoryElement history = new HistoryElement();
configuration.setHistory(history);
assertSame(history, configuration.getHistory());
EventBusElement eventBus = new EventBusElement("", "", false);
configuration.setEventBus(eventBus);
assertSame(eventBus, configuration.getEventBus());
JClassType module = oracle.findType(Mvp4gModule.class.getCanonicalName());
configuration.setModule(module);
assertSame(module, configuration.getModule());
JClassType parentEventBus = oracle.addClass(EventBus.class);
configuration.setParentEventBus(parentEventBus);
assertSame(parentEventBus, configuration.getParentEventBus());
String historyName = "historyName";
configuration.setHistoryName("historyName");
assertSame(historyName, configuration.getHistoryName());
ChildModulesElement childConfig = new ChildModulesElement();
configuration.setLoadChildConfig(childConfig);
assertSame(childConfig, configuration.getLoadChildConfig());
DebugElement debug = new DebugElement();
configuration.setDebug(debug);
assertSame(debug, configuration.getDebug());
GinModuleElement gin = new GinModuleElement();
configuration.setGinModule(gin);
assertSame(gin, configuration.getGinModule());
EventFiltersElement filters = new EventFiltersElement();
configuration.setEventFilterConfiguration(filters);
assertSame(filters, configuration.getEventFilterConfiguration());
}
Aggregations