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:05:26 GMT
arminw      2005/10/22 13:05:26

  Modified:    src/test/org/apache/ojb/broker
                        InheritanceMultipleTableTest.java
  Log:
  minor test enhancement
  
  Revision  Changes    Path
  1.21      +8 -9      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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- InheritanceMultipleTableTest.java	1 Oct 2005 13:50:33 -0000	1.20
  +++ InheritanceMultipleTableTest.java	22 Oct 2005 20:05:26 -0000	1.21
  @@ -300,24 +300,23 @@
           consortium.setShareholders(sh);
   
           Identity oidCon;
  -        try
  -        {
  +        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());
  -        }
  -        catch(PersistenceBrokerException e)
  -        {
  -            e.printStackTrace();
  -            throw e;
  -        }
   
  +        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));
  
  
  

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