use of com.mvp4g.rebind.exception.InvalidMvp4gConfigurationException in project mvp4g by mvp4g.
the class Mvp4gConfigurationTest method testForwardEventWithParameter.
@Test
public void testForwardEventWithParameter() throws InvalidMvp4gConfigurationException {
configuration.setModule(oracle.addClass(Modules.Module01.class));
EventElement e = newEvent("forward");
e.setEventObjectClass(new String[] { Object.class.getCanonicalName() });
events.add(e);
StartElement start = configuration.getStart();
start.setForwardEventType("forward");
try {
setEventBus();
JClassType parentEventBus = oracle.addClass(EventBus.class);
configuration.setParentEventBus(parentEventBus);
configuration.validateEvents();
fail();
} catch (InvalidMvp4gConfigurationException ex) {
assertEquals("Forward: Forward event forward can't have any object associated with it.", ex.getMessage());
}
}
use of com.mvp4g.rebind.exception.InvalidMvp4gConfigurationException in project mvp4g by mvp4g.
the class Mvp4gConfigurationTest method testEmptyHistoryNameForRoot.
@Test
public void testEmptyHistoryNameForRoot() {
EventElement e = newEvent("start");
e.setEventObjectClass(new String[] { Object.class.getCanonicalName() });
e.setHistory("history");
e.setName("");
events.add(e);
try {
configuration.validateHistoryConverters();
fail();
} catch (InvalidMvp4gConfigurationException ex) {
assertEquals("Event start: An event of the Mvp4g Root module can't have an history name equal to empty string.", ex.getMessage());
}
}
Aggregations