use of org.finos.symphony.toolkit.workflow.fixture.EJTestObject in project spring-bot by finos.
the class TestEntityJsonConversion method testOb3.
@Test
public void testOb3() throws Exception {
EJTestObject a1 = new EJTestObject(new SymphonyRoom("abc", "123"), new SymphonyUser("Robert Moffat", "rbo@kjite9.com"), "SOme message");
String out = toWorkflowJson(a1);
compare(out, "{\n" + " \"workflow_001\" : {\n" + " \"type\" : \"org.finos.symphony.toolkit.workflow.fixture.eJTestObject\",\n" + " \"version\" : \"1.0\",\n" + " \"r\" : {\n" + " \"type\" : \"org.finos.symphony.toolkit.workflow.content.chat\",\n" + " \"version\" : \"1.0\",\n" + " \"id\" : [ {\n" + " \"type\" : \"com.symphony.user.streamID\",\n" + " \"version\" : \"1.0\",\n" + " \"value\" : \"123\"\n" + " }, {\n" + " \"type\" : \"org.finos.symphony.toolkit.workflow.sources.symphony.content.roomName\",\n" + " \"version\" : \"1.0\",\n" + " \"value\" : \"abc\"\n" + " } ]\n" + " },\n" + " \"u\" : {\n" + " \"type\" : \"com.symphony.user.mention\",\n" + " \"version\" : \"1.0\",\n" + " \"id\" : [ {\n" + " \"type\" : \"com.symphony.user.displayName\",\n" + " \"version\" : \"1.0\",\n" + " \"value\" : \"Robert Moffat\"\n" + " }, {\n" + " \"type\" : \"com.symphony.user.emailAddress\",\n" + " \"version\" : \"1.0\",\n" + " \"value\" : \"rbo@kjite9.com\"\n" + " } ]\n" + " },\n" + " \"someText\" : \"SOme message\"\n" + " }\n" + "}");
EJTestObject b = (EJTestObject) readWorkflowValue(out);
Assertions.assertEquals(a1, b);
}
Aggregations