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 PBListenerTest.java
Date Wed, 20 Apr 2005 22:40:17 GMT
arminw      2005/04/20 15:40:16

  Modified:    src/test/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        PBListenerTest.java
  Log:
  fix problem in test when transient object is deleted, use persistent instead
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.3.2.1   +5 -1      db-ojb/src/test/org/apache/ojb/broker/PBListenerTest.java
  
  Index: PBListenerTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/PBListenerTest.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- PBListenerTest.java	31 May 2004 22:57:21 -0000	1.3
  +++ PBListenerTest.java	20 Apr 2005 22:40:16 -0000	1.3.2.1
  @@ -47,10 +47,10 @@
       public void testUpdateCallbacks() throws Exception
       {
           PBAwareObject obj = new PBAwareObject();
  -        Identity oid = new Identity(obj, broker);
           broker.beginTransaction();
           broker.store(obj);
           broker.commitTransaction();
  +        Identity oid = new Identity(obj, broker);
   
           PBAwareObject lookedUp = (PBAwareObject) broker.getObjectByIdentity(oid);
           lookedUp.setName("testUpdateCallbacks");
  @@ -69,6 +69,10 @@
       public void testDeleteCallbacks() throws Exception
       {
           PBAwareObject obj = new PBAwareObject();
  +        broker.beginTransaction();
  +        broker.store(obj);
  +        broker.commitTransaction();
  +        
           assertEquals(false, obj.getCalledBeforeDelete());
           assertEquals(false, obj.getCalledAfterDelete());
           broker.beginTransaction();
  
  
  

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