db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker QueryTest.java
Date Sat, 13 Dec 2003 20:47:10 GMT
thma        2003/12/13 12:47:10

  Modified:    src/test/org/apache/ojb/broker QueryTest.java
  Log:
  produce a meaningful failure instead of an error at least..
  
  Revision  Changes    Path
  1.46      +4 -2      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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- QueryTest.java	13 Dec 2003 18:07:41 -0000	1.45
  +++ QueryTest.java	13 Dec 2003 20:47:10 -0000	1.46
  @@ -508,7 +508,6 @@
           //
           broker.clearCache();
           cldArticle.setProxyClass(null);
  -        cldArticle.setProxyClassName(null);
   
           Criteria crit = new Criteria();
           crit.addLessOrEqualThan("groupId", new Integer(5));
  @@ -521,6 +520,7 @@
           assertTrue(results.size() > 0);
           ProductGroupWithArray pg = (ProductGroupWithArray) results.toArray()[0];
           int articleSize = pg.getAllArticles().length;
  +        assertTrue(articleSize != 0 );
           String articleString = Arrays.asList(pg.getAllArticles()).toString();
   
           //
  @@ -528,7 +528,7 @@
           //
           broker.clearCache();
           cldArticle.setProxyClass(articleProxy);
  -        cldArticle.setProxyClassName(articleProxy.getName());
  +
   
           crit = new Criteria();
           crit.addEqualTo("groupId", new Integer(5));
  @@ -536,6 +536,8 @@
           results = broker.getCollectionByQuery(q);
           ProductGroupWithArray pg2 = (ProductGroupWithArray) results.toArray()[0];
           InterfaceArticle[] articles = pg2.getAllArticles();
  +        assertNotNull("Array of articles should not be null!", articles);
  +        assertTrue("Array should contain more than 0 entries!",articles.length != 0);
   
           // force materialization
           for (int i = 0; i < articles.length; i++)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message