use of org.finos.symphony.toolkit.workflow.fixture.TestObject in project spring-bot by finos.
the class TestFormMessageML method createAxesWorkResponse.
protected WorkResponse createAxesWorkResponse(WorkMode wm) {
TestObject a1 = new TestObject("83274239874", true, true, "rob@example.com", 234786, 2138);
TestObject a2 = new TestObject("AUD274239874", true, false, "gregb@example.com", 2386, new BigDecimal("234823498.573"));
TestObjects a = new TestObjects(Arrays.asList(a1, a2));
WorkResponse wr = createWorkAddSubmit(wm, a);
return wr;
}
use of org.finos.symphony.toolkit.workflow.fixture.TestObject in project spring-bot by finos.
the class TestTableEdit method testAddRow.
@Test
public void testAddRow() throws Exception {
// ok, make changes and post back
TestObject newTo = new TestObject();
newTo.setCreator("newb@thing.com");
newTo.setIsin("isiny");
newTo.setBidAxed(true);
newTo.setBidQty(324);
add("testAddRow", to, newTo, "items.");
}
use of org.finos.symphony.toolkit.workflow.fixture.TestObject in project spring-bot by finos.
the class TestTableEdit method testEditRow.
@Test
public void testEditRow() throws Exception {
TestObject newTo = new TestObject();
newTo.setCreator("newb@thing.com");
newTo.setIsin("isiny");
newTo.setBidAxed(true);
newTo.setBidQty(324);
editRow("testEditRow", to, newTo, "items.[0].");
}
use of org.finos.symphony.toolkit.workflow.fixture.TestObject in project spring-bot by finos.
the class TestEntityJsonConversion method testObject.
@Test
public void testObject() throws Exception {
TestObject a = new TestObject("83274239874", true, true, "rob@example.com", 234786, 2138);
// can we convert to messageML? (something populated)
String out = toWorkflowJson(a);
compare(out, "{\"workflow_001\":{\"type\":\"org.finos.symphony.toolkit.workflow.fixture.testObject\",\"version\":\"1.0\",\"isin\":\"83274239874\",\"bidAxed\":true,\"askAxed\":true,\"creator\":\"rob@example.com\",\"bidQty\":234786,\"askQty\":2138}}");
TestObject b = (TestObject) readWorkflowValue(out);
Assertions.assertEquals(a, b);
}
use of org.finos.symphony.toolkit.workflow.fixture.TestObject in project spring-bot by finos.
the class TestFormConverter method testSimpleForm.
@SuppressWarnings("unchecked")
@Test
public void testSimpleForm() throws Exception {
Object o = om.readValue("{\"action\":\"add+0\",\"isin.\":\"fd3442\",\"bidAxed.\":\"true\",\"askAxed.\":\"true\",\"creator.\":\"tr\",\"bidQty.\":\"32432\",\"askQty.\":\"234\"}", Map.class);
TestObject to = (TestObject) fc.convert((Map<String, Object>) o, TestObject.class.getCanonicalName());
Assertions.assertEquals("fd3442", to.getIsin());
Assertions.assertEquals("tr", to.getCreator());
Assertions.assertEquals(32432, to.getBidQty());
}
Aggregations