db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mka...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker QueryTest.java
Date Wed, 09 Mar 2005 21:09:34 GMT
mkalen      2005/03/09 13:09:34

  Modified:    src/test/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        QueryTest.java
  Log:
  Flip some backward assertions to get proper printouts on failures.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.61.2.14 +18 -18    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.61.2.13
  retrieving revision 1.61.2.14
  diff -u -r1.61.2.13 -r1.61.2.14
  --- QueryTest.java	4 Mar 2005 23:33:47 -0000	1.61.2.13
  +++ QueryTest.java	9 Mar 2005 21:09:34 -0000	1.61.2.14
  @@ -642,7 +642,7 @@
   
           Collection results = broker.getCollectionByQuery(q);
           assertNotNull(results);
  -        assertEquals(results.size(), 5);
  +        assertEquals(5, results.size());
   
           // compare with count
           int count = broker.getCount(q);
  @@ -661,7 +661,7 @@
   
           Collection results = broker.getCollectionByQuery(q);
           assertNotNull(results);
  -        assertEquals(results.size(), 3);
  +        assertEquals(3, results.size());
   
           // compare with count
           int count = broker.getCount(q);
  @@ -707,7 +707,7 @@
           while(iter.hasNext())
           {
               Object[] row = (Object[]) iter.next();
  -            assertEquals(row.length, 3);
  +            assertEquals(3, row.length);
   
               results.add(row);
           }
  @@ -756,7 +756,7 @@
           while(iter.hasNext())
           {
               Object[] row = (Object[]) iter.next();
  -            assertEquals(row.length, 1);
  +            assertEquals(1, row.length);
   
               results.add(row);
           }
  @@ -811,7 +811,7 @@
           while(iter.hasNext())
           {
               Object[] row = (Object[]) iter.next();
  -            assertEquals(row.length, 3);
  +            assertEquals(3, row.length);
   
   //            assertEquals(row[0].getClass(), BigDecimal.class);
   //            assertEquals(row[1].getClass(), String.class);
  @@ -989,7 +989,7 @@
           {
               results.add(iter.next());
           }
  -        assertEquals(results.size(), 9);
  +        assertEquals(9, results.size());
   
           // compare with count
           int count = broker.getCount(q);
  @@ -1591,10 +1591,10 @@
           }
   
           // Groups 2, 5
  -        assertEquals("check size", list.size(), 2);
  +        assertEquals("check size", 2, list.size());
   
  -        assertEquals("Group 2", ((InterfaceProductGroup) list.get(0)).getId().intValue(),
2);
  -        assertEquals("Group 5", ((InterfaceProductGroup) list.get(1)).getId().intValue(),
5);
  +        assertEquals("Group 2", 2, ((InterfaceProductGroup) list.get(0)).getId().intValue());
  +        assertEquals("Group 5", 5, ((InterfaceProductGroup) list.get(1)).getId().intValue());
       }
   
       /**
  @@ -1664,7 +1664,7 @@
   
           Criteria crit = new Criteria();
           crit.addLike("groupName", "%o%");
  -        crit.addLike("allArticlesInGroup.articleName", "%\u00f6%"); //unicode for รถ
  +        crit.addLike("allArticlesInGroup.articleName", "%\u00f6%"); //unicode for ๖
   
           ReportQueryByCriteria q = QueryFactory.newReportQuery(ProductGroup.class, crit,
true);
           q.setAttributes(new String[]{"groupId", "groupName"});
  @@ -1676,7 +1676,7 @@
           }
   
           // Groups: 3 Books , 1 Dairy Product
  -        assertEquals("check size", list.size(), 2);
  +        assertEquals("check size", 2, list.size());
       }
   
       /**
  @@ -1718,7 +1718,7 @@
           }
   
           // ProductGroup 5
  -        assertEquals("check size", list.size(), 1);
  +        assertEquals("check size", 1, list.size());
       }
   
       /**
  @@ -1740,7 +1740,7 @@
           }
   
           // ProductGroups 4 and 5
  -        assertEquals("check size", list.size(), 2);
  +        assertEquals("check size", 2, list.size());
   
       }
   
  @@ -1764,7 +1764,7 @@
           }
   
           // ProductGroups 5
  -        assertEquals("check size", list.size(), 1);
  +        assertEquals("check size", 1, list.size());
       }
   
       /**
  @@ -1786,7 +1786,7 @@
           }
   
           // ProductGroup 5
  -        assertEquals("check size", list.size(), 1);
  +        assertEquals("check size", 1, list.size());
       }
   
       /**
  @@ -1813,7 +1813,7 @@
           }
   
           // ProductGroup 4
  -        assertEquals("check size", list.size(), 1);
  +        assertEquals("check size", 1, list.size());
       }
   
       /**
  @@ -1846,7 +1846,7 @@
           }
   
           // ProductGroup 4 with it's Articles
  -        assertEquals("check size", list.size(), 1);
  +        assertEquals("check size", 1, list.size());
       }
   
       /**
  
  
  

---------------------------------------------------------------------
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