db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker ExtentAwarePathExpressionsTest.java
Date Sat, 03 Dec 2005 12:22:32 GMT
arminw      2005/12/03 04:22:32

  Modified:    src/test/org/apache/ojb/broker
                        ExtentAwarePathExpressionsTest.java
  Log:
  merge with 1.0.x branch
  
  Revision  Changes    Path
  1.14      +22 -3     db-ojb/src/test/org/apache/ojb/broker/ExtentAwarePathExpressionsTest.java
  
  Index: ExtentAwarePathExpressionsTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/ExtentAwarePathExpressionsTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ExtentAwarePathExpressionsTest.java	15 Nov 2005 02:20:45 -0000	1.13
  +++ ExtentAwarePathExpressionsTest.java	3 Dec 2005 12:22:32 -0000	1.14
  @@ -278,6 +278,25 @@
           criteria.addEqualTo("qualifiers.importance", "unimportant");
           criteria.addEqualTo("qualifiers.name", "Sellers");
           QueryByCriteria query = QueryFactory.newQuery(BaseContentImpl.class, criteria,
true);
  +        query.addPathClass("qualifiers", Qualifier.class);
  +        query.addPathClass("qualifiers", Topic.class);
  +        query.addPathClass("qualifiers", TopicExt.class);
  +        List content = (List) broker.getCollectionByQuery(query);
  +
  +        assertEquals(1, content.size());
  +        assertEquals(11, ((Paper)content.get(0)).getId());
  +        assertNotNull(((Paper)content.get(0)).getQualifiers());
  +        assertEquals(2, ((Paper)content.get(0)).getQualifiers().size());
  +    }
  +
  +    // Test multiple path class on query object
  +    public void testMultipleClassPath_1b()
  +    {
  +        Criteria criteria = new Criteria();
  +        criteria.addLike("headline", "SAL%");
  +        criteria.addEqualTo("qualifiers.importance", "unimportant");
  +        criteria.addEqualTo("qualifiers.name", "Sellers");
  +        QueryByCriteria query = QueryFactory.newQuery(BaseContentImpl.class, criteria,
true);
           //query.addPathClass("qualifiers", Qualifier.class);
           query.addPathClass("qualifiers", Topic.class);
           query.addPathClass("qualifiers", TopicExt.class);
  @@ -290,7 +309,7 @@
       }
   
       // Test multiple path class on criteria object
  -    public void testMultipleClassPath_1b()
  +    public void testMultipleClassPath_2a()
       {
           Criteria criteria = new Criteria();
           criteria.addLike("headline", "SAL%");
  @@ -309,7 +328,7 @@
       }
   
       // Test multiple path class on query object
  -    public void testMultipleClassPath_1c()
  +    public void testMultipleClassPath_2b()
       {
           Criteria criteria = new Criteria();
           criteria.addLike("headline", "SAL%");
  
  
  

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