use of com.mvp4g.client.test_tools.EventBusWithLookUpStub in project mvp4g by mvp4g.
the class NavigationEventCommandTest method setUp.
@Before
public void setUp() {
eventBus = new EventBusWithLookUpStub();
cmd = new NavigationEventCommand(eventBus) {
@Override
protected void execute() {
// nothing to do
}
};
conf = new NavigationConfirmationInterface() {
public void confirm(NavigationEventCommand event) {
// nothing to do
}
};
}
use of com.mvp4g.client.test_tools.EventBusWithLookUpStub in project mvp4g by mvp4g.
the class PlaceServiceTest method testConverterForChildModuleNoParameter.
@Test
public void testConverterForChildModuleNoParameter() {
String historyName = "child/historyName";
EventBusWithLookUpStub childBus = new EventBusWithLookUpStub();
Mvp4gModuleStub childModule = new Mvp4gModuleStub(childBus);
ValueChangeEvent<String> event = new ValueChangeEventStub<String>(historyName);
placeServiceDefault.addConverter(historyName, buildHistoryConverter(false));
placeServiceDefault.onValueChange(event);
assertEquals(historyName, module.getEventType());
Mvp4gEventPasser passer = module.getPasser();
passer.setEventObject(false);
passer.pass(childModule);
assertTrue(module.isHistoryNotFound());
passer.setEventObject(true);
passer.pass(childModule);
childBus.assertEvent("historyName", new Object[] { null });
}
use of com.mvp4g.client.test_tools.EventBusWithLookUpStub in project mvp4g by mvp4g.
the class PlaceServiceTest method setUp.
@Before
public void setUp() {
history = new HistoryProxyStub();
historySeparator = new HistoryProxyStub();
historySeparatorAdd = new HistoryProxyStub();
eventBus = new EventBusWithLookUpStub();
module = new Mvp4gModuleStub(eventBus);
placeServiceDefault = new PlaceService(history);
placeServiceDefault.setModule(module);
}
use of com.mvp4g.client.test_tools.EventBusWithLookUpStub in project mvp4g by mvp4g.
the class PlaceServiceTest method testConverterForChildModuleNoConverter.
@Test
public void testConverterForChildModuleNoConverter() {
String historyName = "child/historyName";
EventBusWithLookUpStub childBus = new EventBusWithLookUpStub();
Mvp4gModuleStub childModule = new Mvp4gModuleStub(childBus);
ValueChangeEvent<String> event = new ValueChangeEventStub<String>(historyName);
placeServiceDefault.onValueChange(event);
assertEquals(historyName, module.getEventType());
Mvp4gEventPasser passer = module.getPasser();
passer.setEventObject(true);
passer.pass(childModule);
assertTrue(module.isHistoryNotFound());
}
use of com.mvp4g.client.test_tools.EventBusWithLookUpStub in project mvp4g by mvp4g.
the class PlaceServiceTest method testConverterForChildModuleWithParameter.
@Test
public void testConverterForChildModuleWithParameter() {
String historyName = "child/eventType";
String form = "form";
EventBusWithLookUpStub childBus = new EventBusWithLookUpStub();
Mvp4gModuleStub childModule = new Mvp4gModuleStub(childBus);
placeServiceDefault.addConverter(historyName, buildHistoryConverter(false));
ValueChangeEvent<String> event = new ValueChangeEventStub<String>(historyName + "?" + form);
placeServiceDefault.onValueChange(event);
assertEquals(historyName, module.getEventType());
Mvp4gEventPasser passer = module.getPasser();
passer.setEventObject(true);
passer.pass(childModule);
childBus.assertEvent("eventType", new Object[] { form });
}
Aggregations