You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by mk...@apache.org on 2005/03/18 21:47:48 UTC
cvs commit: db-ojb/src/test/org/apache/ojb/odmg CollectionsTest.java
mkalen 2005/03/18 12:47:48
Modified: src/test/org/apache/ojb/odmg Tag: OJB_1_0_RELEASE
CollectionsTest.java
Log:
Asserts on Gather classes beeing returned in the right order.
Revision Changes Path
No revision
No revision
1.13.2.7 +9 -3 db-ojb/src/test/org/apache/ojb/odmg/CollectionsTest.java
Index: CollectionsTest.java
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/CollectionsTest.java,v
retrieving revision 1.13.2.6
retrieving revision 1.13.2.7
diff -u -r1.13.2.6 -r1.13.2.7
--- CollectionsTest.java 18 Mar 2005 19:22:30 -0000 1.13.2.6
+++ CollectionsTest.java 18 Mar 2005 20:47:48 -0000 1.13.2.7
@@ -602,8 +602,10 @@
final String queryStr = "select gatherer from " + Gatherer.class.getName() + " where gatId=$1 or gatId=$2";
// prepare test case
- Gatherer gat = new Gatherer(null, prefix + "_Gatherer");
- Gatherer gat2 = new Gatherer(null, prefix + "_Gatherer2");
+ final String gat1Name = prefix + "_Gatherer";
+ final String gat2Name = prefix + "_Gatherer2";
+ Gatherer gat = new Gatherer(null, gat1Name);
+ Gatherer gat2 = new Gatherer(null, gat2Name);
// set List of CollectiblesC objects
CollectibleC collC_1 = new CollectibleC(prefix + "NO_1", null, "nothing1");
CollectibleC collC_2 = new CollectibleC(prefix + "NO_2", null, "nothing2");
@@ -631,6 +633,10 @@
Gatherer fetchedGat2 = (Gatherer) it.next();
assertNotNull(fetchedGat);
assertNotNull(fetchedGat2);
+ assertEquals("Wrong gatherer returned: fetchedGat should be first Gatherer",
+ gat1Name, fetchedGat.getName());
+ assertEquals("Wrong gatherer returned: fetchedGat2 should be second Gatherer",
+ gat2Name, fetchedGat2.getName());
assertNotNull(fetchedGat.collectiblesC);
assertNotNull(fetchedGat2.collectiblesC);
assertEquals(1, fetchedGat.getCollectiblesC().size());
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org