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/sequence NativeIdentifierTest.java
Date Fri, 25 Jul 2003 17:51:59 GMT
arminw      2003/07/25 10:51:59

  Modified:    src/test/org/apache/ojb/broker/sequence
                        NativeIdentifierTest.java
  Log:
  do more comparisons
  
  Revision  Changes    Path
  1.6       +13 -1     db-ojb/src/test/org/apache/ojb/broker/sequence/NativeIdentifierTest.java
  
  Index: NativeIdentifierTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/sequence/NativeIdentifierTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NativeIdentifierTest.java	24 Jul 2003 10:10:12 -0000	1.5
  +++ NativeIdentifierTest.java	25 Jul 2003 17:51:59 -0000	1.6
  @@ -262,6 +262,9 @@
           // get Identity objects
           Identity oid_1 = new Identity(obj_1, broker);
           Identity oid_2 = new Identity(obj_2, broker);
  +        // get identifier (PK) values
  +        Long id_1 = obj_1.getIdentifier();
  +        Long id_2 = obj_2.getIdentifier();
   
           broker.clearCache();
   
  @@ -309,6 +312,8 @@
           broker.commitTransaction();
           assertNotNull(ref_5.getRefIdentifier());
           assertNotNull(ref_6.getRefIdentifier());
  +        assertEquals(id_1, obj_1.getIdentifier());
  +        assertEquals(id_2, obj_2.getIdentifier());
   
           obj_1 = (SMNativeObject) broker.getObjectByIdentity(oid_1);
           assertNotNull(obj_1);
  @@ -322,6 +327,9 @@
           assertNotNull(references);
           assertEquals("1 references expected for object: "+obj_2, 1, references.size());
   
  +        assertEquals(id_1, obj_1.getIdentifier());
  +        assertEquals(id_2, obj_2.getIdentifier());
  +
           // now update main objects
           obj_1.setName(name+"_update");
           obj_2.setName(name+"_update");
  @@ -337,6 +345,8 @@
           assertNotNull(obj_2);
           assertEquals(obj_1.getName(), name+"_update");
           assertEquals(obj_2.getName(), name+"_update");
  +        assertEquals(id_1, obj_1.getIdentifier());
  +        assertEquals(id_2, obj_2.getIdentifier());
   
           // now update reference
           obj_2 = (SMNativeObject) broker.getObjectByIdentity(oid_2);
  @@ -352,6 +362,8 @@
           references = obj_2.getAllReferences();
           ref = (SMNativeReference) references.get(0);
           assertEquals(nameRef+"_update", ref.getRefName());
  +        assertEquals(id_1, obj_1.getIdentifier());
  +        assertEquals(id_2, obj_2.getIdentifier());
       }
   
       public static class SMNativeObject implements Serializable
  
  
  

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