use of com.canoo.dp.impl.server.legacy.ServerModelStore in project dolphin-platform by canoo.
the class ServerEventDispatcherTest method testLocalSystemIdentifier.
@Test
public void testLocalSystemIdentifier() {
// given:
ServerModelStore serverModelStore = new ServerModelStore();
ServerEventDispatcher dispatcher = new ServerEventDispatcher(serverModelStore);
// then:
assertEquals(dispatcher.getLocalSystemIdentifier(), RemotingConstants.SOURCE_SYSTEM_SERVER);
}
use of com.canoo.dp.impl.server.legacy.ServerModelStore in project dolphin-platform by canoo.
the class ServerPresentationModelBuilderFactoryTest method testSimpleCreation.
@Test
public void testSimpleCreation() {
ServerModelStore serverModelStore = createServerModelStore();
ServerPresentationModelBuilderFactory factory = new ServerPresentationModelBuilderFactory(serverModelStore);
PresentationModelBuilder<ServerPresentationModel> builder = factory.createBuilder();
assertNotNull(builder);
}
use of com.canoo.dp.impl.server.legacy.ServerModelStore in project dolphin-platform by canoo.
the class ServerPresentationModelBuilderTest method testWithFilledAttributeCreation.
@Test
public void testWithFilledAttributeCreation() {
ServerModelStore serverModelStore = createServerModelStore();
ServerPresentationModelBuilder builder = new ServerPresentationModelBuilder(serverModelStore);
ServerPresentationModel model = builder.withAttribute("testName", "testValue").create();
assertNotNull(model);
assertEquals(model.getAttributes().size(), 2);
assertNotNull(model.getAttribute(RemotingConstants.SOURCE_SYSTEM));
assertNotNull(model.getAttribute("testName"));
assertEquals(model.getAttribute("testName").getValue(), "testValue");
}
use of com.canoo.dp.impl.server.legacy.ServerModelStore in project dolphin-platform by canoo.
the class ServerPresentationModelBuilderTest method testSimpleCreation.
@Test
public void testSimpleCreation() {
ServerModelStore serverModelStore = createServerModelStore();
ServerPresentationModelBuilder builder = new ServerPresentationModelBuilder(serverModelStore);
ServerPresentationModel model = builder.create();
assertNotNull(model);
assertEquals(model.getAttributes().size(), 1);
assertEquals(model.getAttributes().get(0).getPropertyName(), RemotingConstants.SOURCE_SYSTEM);
assertEquals(model.getAttributes().get(0).getValue(), RemotingConstants.SOURCE_SYSTEM_SERVER);
}
use of com.canoo.dp.impl.server.legacy.ServerModelStore in project dolphin-platform by canoo.
the class ServerPresentationModelBuilderTest method testWithTypeCreation.
@Test
public void testWithTypeCreation() {
ServerModelStore serverModelStore = createServerModelStore();
ServerPresentationModelBuilder builder = new ServerPresentationModelBuilder(serverModelStore);
ServerPresentationModel model = builder.withType("testType").create();
assertNotNull(model);
assertEquals(model.getPresentationModelType(), "testType");
}
Aggregations