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 br...@apache.org on 2004/02/07 21:39:46 UTC
cvs commit: db-ojb/src/test/org/apache/ojb/broker QueryTest.java
brj 2004/02/07 12:39:46
Modified: src/test/org/apache/ojb/broker QueryTest.java
Log:
compare retrieved result.size() with counted size
Revision Changes Path
1.49 +21 -0 db-ojb/src/test/org/apache/ojb/broker/QueryTest.java
Index: QueryTest.java
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/QueryTest.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- QueryTest.java 29 Jan 2004 20:50:59 -0000 1.48
+++ QueryTest.java 7 Feb 2004 20:39:46 -0000 1.49
@@ -223,6 +223,10 @@
Collection results = broker.getCollectionByQuery(q);
assertNotNull(results);
assertTrue(results.size() > 0);
+
+ // compare with count
+ int count = broker.getCount(q);
+ assertEquals(results.size(), count);
}
/**
@@ -255,6 +259,9 @@
assertNotNull(results);
assertTrue(results.size() == 5);
+ // compare with count
+ int count = broker.getCount(q);
+ assertEquals(results.size(), count);
}
/**
@@ -275,6 +282,10 @@
Collection results = broker.getCollectionByQuery(q);
assertNotNull(results);
assertTrue(results.size() == 3);
+
+ // compare with count
+ int count = broker.getCount(q);
+ assertEquals(results.size(), count);
}
/**
@@ -293,6 +304,9 @@
assertNotNull(results);
assertTrue(results.size() > 0);
+ // compare with count
+ int count = broker.getCount(q);
+ assertEquals(results.size(), count);
}
/**
@@ -368,6 +382,9 @@
assertEquals(results.size(), 5);
+ // compare with count
+ int count = broker.getCount(q);
+ assertEquals(results.size(), count);
}
/**
@@ -521,6 +538,10 @@
results.add(iter.next());
}
assertTrue(results.size() > 0);
+
+ // compare with count
+ int count = broker.getCount(q);
+// assertEquals(results.size(), count);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org