use of org.apache.cayenne.testdo.mt.ClientMtTable3 in project cayenne by apache.
the class ClientServerChannelIT method testPerformQueryValuePropagation.
@Test
public void testPerformQueryValuePropagation() throws Exception {
byte[] bytes = new byte[] { 1, 2, 3 };
tMtTable3.insert(1, bytes, "abc", 4);
Query query = new SelectQuery("MtTable3");
QueryResponse response = clientServerChannel.onQuery(null, query);
assertNotNull(response);
List<?> results = response.firstList();
assertNotNull(results);
assertEquals(1, results.size());
Object result = results.get(0);
assertTrue("Result is of wrong type: " + result, result instanceof ClientMtTable3);
ClientMtTable3 clientObject = (ClientMtTable3) result;
assertEquals("abc", clientObject.getCharColumn());
assertEquals(new Integer(4), clientObject.getIntColumn());
assertTrue(new EqualsBuilder().append(clientObject.getBinaryColumn(), bytes).isEquals());
}
Aggregations