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 ar...@apache.org on 2004/10/04 15:25:52 UTC
cvs commit: db-ojb/src/test/org/apache/ojb/broker PersistenceBrokerTest.java
arminw 2004/10/04 06:25:52
Modified: src/test/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
PersistenceBrokerTest.java
Log:
don't catch exceptions in junit test
Revision Changes Path
No revision
No revision
1.42.2.1 +10 -17 db-ojb/src/test/org/apache/ojb/broker/PersistenceBrokerTest.java
Index: PersistenceBrokerTest.java
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/PersistenceBrokerTest.java,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -r1.42 -r1.42.2.1
--- PersistenceBrokerTest.java 31 May 2004 22:57:21 -0000 1.42
+++ PersistenceBrokerTest.java 4 Oct 2004 13:25:52 -0000 1.42.2.1
@@ -1012,25 +1012,18 @@
*/
public void testSortedCollectionAttribute()
{
- try
+ ProductGroup samplePG = new ProductGroup();
+ samplePG.setId(1);
+ InterfaceProductGroup pg = (InterfaceProductGroup) broker.getObjectByQuery(new QueryByIdentity(samplePG));
+ Iterator iter = pg.getAllArticles().iterator();
+ InterfaceArticle a1 = null;
+ InterfaceArticle a2 = null;
+ a1 = (InterfaceArticle) iter.next();
+ while (iter.hasNext())
{
- ProductGroup samplePG = new ProductGroup();
- samplePG.setId(1);
- InterfaceProductGroup pg = (InterfaceProductGroup) broker.getObjectByQuery(new QueryByIdentity(samplePG));
- Iterator iter = pg.getAllArticles().iterator();
- InterfaceArticle a1 = null;
- InterfaceArticle a2 = null;
+ a2 = a1;
a1 = (InterfaceArticle) iter.next();
- while (iter.hasNext())
- {
- a2 = a1;
- a1 = (InterfaceArticle) iter.next();
- assertTrue(a1.getArticleId() < a2.getArticleId());
- }
- }
- catch (Throwable t)
- {
- fail(t.getMessage());
+ assertTrue(a1.getArticleId() < a2.getArticleId());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org