[jboss-svn-commits] JBL Code SVN: r31638 - labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Feb 12 14:31:15 EST 2010
Author: baunax
Date: 2010-02-12 14:31:15 -0500 (Fri, 12 Feb 2010)
New Revision: 31638
Modified:
labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointWithJaxbTest.java
Log:
changed the way that a NativeQueryResults is translated to FlatQueryResults
Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointWithJaxbTest.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointWithJaxbTest.java 2010-02-12 19:30:55 UTC (rev 31637)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointWithJaxbTest.java 2010-02-12 19:31:15 UTC (rev 31638)
@@ -189,7 +189,8 @@
cmd.setLookup("ksession1");
cmd.getCommands().add(new InsertObjectCommand(new Person("lucaz")));
cmd.getCommands().add(new InsertObjectCommand(new Person("hadrian")));
- cmd.getCommands().add(new InsertObjectCommand(new Person("baunax")));
+ cmd.getCommands().add(new InsertObjectCommand(new Person("baunax", 43)));
+ cmd.getCommands().add(new InsertObjectCommand(new Person("baunax", 21)));
cmd.getCommands().add(new QueryCommand("persons", "persons", null));
cmd.getCommands().add(new QueryCommand("person", "personWithName", new String[] {"baunax"} ));
@@ -208,13 +209,13 @@
assertNotNull(resp);
FlatQueryResults personQuery = (FlatQueryResults) resp.getValue("person");
- assertEquals(1, personQuery.size());
+ assertEquals(2, personQuery.size());
FlatQueryResults personsQuery = (FlatQueryResults) resp.getValue("persons");
- assertEquals(1, personsQuery.size());
+ assertEquals(5, personsQuery.size());
Iterator<QueryResultsRow> iterator = personQuery.iterator();
QueryResultsRow row = iterator.next();
- Person person = (Person) row.get("param");
+ Person person = (Person) row.get("$p");
assertEquals("baunax", person.getName());
}
More information about the jboss-svn-commits
mailing list