db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker AnonymousFieldsTest.java
Date Sun, 17 Aug 2003 09:10:16 GMT
brj         2003/08/17 02:10:16

  Modified:    src/test/org/apache/ojb/broker AnonymousFieldsTest.java
  Log:
  test case for querying fields of superclass
  
  Revision  Changes    Path
  1.4       +5 -2      db-ojb/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java
  
  Index: AnonymousFieldsTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/AnonymousFieldsTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AnonymousFieldsTest.java	14 Aug 2003 18:42:40 -0000	1.3
  +++ AnonymousFieldsTest.java	17 Aug 2003 09:10:16 -0000	1.4
  @@ -104,24 +104,27 @@
       /**
        *
        */
  -    public void XXXtestQuerySuperField()
  +    public void testQuerySuperField()
       {
           int key1 = (int) (Math.random() * Integer.MAX_VALUE);
           int key2 = (int) (Math.random() * Integer.MAX_VALUE);
           ObjectRepository.F f1 = new ObjectRepository.F();
           f1.setSomeValue(key1);
           f1.setSomeSuperValue(key2);
  +        broker.store(f1);
   
           ObjectRepository.F f2 = new ObjectRepository.F();
           f2.setSomeValue(key1);
           f2.setSomeSuperValue(key2);
  +        broker.store(f2);
   
           ObjectRepository.F f3 = new ObjectRepository.F();
           f3.setSomeValue(key1);
           f3.setSomeSuperValue(key2);
  +        broker.store(f3);
   
           Criteria c = new Criteria();
  -        c.addEqualTo("someSuperValue", new Integer(key2));
  +        c.addEqualTo("super.someSuperValue", new Integer(key2));
           Query q = QueryFactory.newQuery(ObjectRepository.F.class, c);
           Collection result = broker.getCollectionByQuery(q);
           assertEquals(3, result.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