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 InheritanceMultipleTableTest.java
Date Sat, 22 Oct 2005 20:03:33 GMT
arminw      2005/10/22 13:03:33

  Modified:    src/test/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        InheritanceMultipleTableTest.java
  Log:
  minor test enhancement
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.17  +18 -19    db-ojb/src/test/org/apache/ojb/broker/InheritanceMultipleTableTest.java
  
  Index: InheritanceMultipleTableTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/InheritanceMultipleTableTest.java,v
  retrieving revision 1.7.2.16
  retrieving revision 1.7.2.17
  diff -u -r1.7.2.16 -r1.7.2.17
  --- InheritanceMultipleTableTest.java	10 Oct 2005 00:35:43 -0000	1.7.2.16
  +++ InheritanceMultipleTableTest.java	22 Oct 2005 20:03:33 -0000	1.7.2.17
  @@ -294,24 +294,23 @@
           consortium.setShareholders(sh);
   
           Identity oidCon;
  -        try
  -        {
  -            broker.beginTransaction();
  -            broker.store(consortium);
  -            broker.commitTransaction();
  -            oidCon = broker.serviceIdentity().buildIdentity(consortium);
  -            broker.clearCache();
  -            Consortium con = (Consortium) broker.getObjectByIdentity(oidCon);
  -            assertNotNull(con);
  -            assertNotNull(con.getShareholders());
  -            assertEquals(2, con.getShareholders().size());
  -        }
  -        catch(PersistenceBrokerException e)
  -        {
  -            e.printStackTrace();
  -            throw e;
  -        }
  +        Identity oidSH;
  +        broker.beginTransaction();
  +        broker.store(consortium);
  +        broker.commitTransaction();
  +        oidCon = broker.serviceIdentity().buildIdentity(consortium);
  +        oidSH = broker.serviceIdentity().buildIdentity(s1);
  +        broker.clearCache();
  +        Consortium con = (Consortium) broker.getObjectByIdentity(oidCon);
  +        assertNotNull(con);
  +        assertNotNull(con.getShareholders());
  +        assertEquals(2, con.getShareholders().size());
   
  +        broker.clearCache();
  +        Shareholder s1_new = (Shareholder) broker.getObjectByIdentity(oidSH);
  +        assertNotNull(s1_new.getConsortiumKey());
  +
  +        broker.clearCache();
           Criteria crit = new Criteria();
           crit.addEqualTo("name", consortium.getName());
           crit.addEqualTo("shareholders.share", new Integer(24));
  @@ -922,7 +921,7 @@
           assertEquals(1, result.size());
       }
   
  -  public void testQuery_ReferenceOuterJoin()
  +    public void testQuery_ReferenceOuterJoin()
       {
           long timestamp = System.currentTimeMillis();
           String name = "testQuery_ReferenceOuterJoin_" + timestamp;
  
  
  

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