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 11:19:45 GMT
arminw      2005/12/03 03:19:44

  Modified:    src/test/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        ExtentAwarePathExpressionsTest.java
  Log:
  add new test
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.5   +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.7.2.4
  retrieving revision 1.7.2.5
  diff -u -r1.7.2.4 -r1.7.2.5
  --- ExtentAwarePathExpressionsTest.java	15 Nov 2005 02:17:05 -0000	1.7.2.4
  +++ ExtentAwarePathExpressionsTest.java	3 Dec 2005 11:19:44 -0000	1.7.2.5
  @@ -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