db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r452841 - in /db/ojb/trunk/src/test/org/apache/ojb/broker: CharacterTest.java FieldConversionTest_2.java GraphTest.java
Date Wed, 04 Oct 2006 11:27:00 GMT
Author: arminw
Date: Wed Oct  4 04:26:59 2006
New Revision: 452841

URL: http://svn.apache.org/viewvc?view=rev&rev=452841
Log:
use IdentityFactory

Modified:
    db/ojb/trunk/src/test/org/apache/ojb/broker/CharacterTest.java
    db/ojb/trunk/src/test/org/apache/ojb/broker/FieldConversionTest_2.java
    db/ojb/trunk/src/test/org/apache/ojb/broker/GraphTest.java

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/CharacterTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/CharacterTest.java?view=diff&rev=452841&r1=452840&r2=452841
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/CharacterTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/CharacterTest.java Wed Oct  4 04:26:59 2006
@@ -38,7 +38,7 @@
 
         broker.clearCache();
 
-        Identity oid = new Identity(obj, broker);
+        Identity oid = broker.serviceIdentity().buildIdentity(obj);
         ObjectWithCharField dbObj;
         assertNotNull(dbObj = (ObjectWithCharField) broker.getObjectByIdentity(oid));
         assertEquals(obj, dbObj);
@@ -53,7 +53,7 @@
 
         broker.clearCache();
 
-        Identity oid = new Identity(obj, broker);
+        Identity oid = broker.serviceIdentity().buildIdentity(obj);
         ObjectWithCharField dbObj;
         assertNotNull(dbObj = (ObjectWithCharField) broker.getObjectByIdentity(oid));
         assertEquals(obj, dbObj);
@@ -68,7 +68,7 @@
 
         broker.clearCache();
 
-        Identity oid = new Identity(obj, broker);
+        Identity oid = broker.serviceIdentity().buildIdentity(obj);
         ObjectWithCharField dbObj;
         assertNotNull(dbObj = (ObjectWithCharField) broker.getObjectByIdentity(oid));
         assertEquals(obj.getId(), dbObj.getId());
@@ -92,7 +92,7 @@
 
         broker.clearCache();
 
-        Identity oid = new Identity(obj, broker);
+        Identity oid = broker.serviceIdentity().buildIdentity(obj);
         ObjectWithCharField dbObj;
         assertNotNull(dbObj = (ObjectWithCharField) broker.getObjectByIdentity(oid));
         assertEquals(obj, dbObj);

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/FieldConversionTest_2.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/FieldConversionTest_2.java?view=diff&rev=452841&r1=452840&r2=452841
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/FieldConversionTest_2.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/FieldConversionTest_2.java Wed Oct  4 04:26:59
2006
@@ -118,7 +118,7 @@
         broker.clearCache();
 
         // save id for recapturing object
-        Identity id = new Identity(cref, broker);
+        Identity id = broker.serviceIdentity().buildIdentity(cref);
         broker.clearCache();
 
         ConversionReferrer referrer = (ConversionReferrer) broker.getObjectByIdentity(id);

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/GraphTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/GraphTest.java?view=diff&rev=452841&r1=452840&r2=452841
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/GraphTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/GraphTest.java Wed Oct  4 04:26:59 2006
@@ -57,27 +57,16 @@
 		GraphNode a = new GraphNode("A");
 		GraphNode b = new GraphNode("B");
 		GraphNode c = new GraphNode("C");
-		Identity oid = new Identity(a, broker);
-		new Identity(b, broker);
-		new Identity(c, broker);
 
 		GraphEdge aa = new GraphEdge(a, a);
 		GraphEdge ab = new GraphEdge(a, b);
 		GraphEdge bc = new GraphEdge(b, c);
 		GraphEdge ac = new GraphEdge(a, c);
-		new Identity(aa, broker);
-		new Identity(ab, broker);
-		new Identity(bc, broker);
-		new Identity(ac, broker);
 
 		Point locA = new Point(0, 0);
 		Point locB = new Point(1, 0);
 		Point locC = new Point(1, 1);
 
-		new Identity(locA, broker);
-		new Identity(locB, broker);
-		new Identity(locC, broker);
-
         broker.beginTransaction();
 		broker.store(locA);
 		broker.store(locB);
@@ -94,7 +83,9 @@
 		broker.store(c);
         broker.commitTransaction();
 
-		broker.clearCache();
+        Identity oid = broker.serviceIdentity().buildIdentity(a);
+
+        broker.clearCache();
 
 		GraphNode retrieved = (GraphNode) broker.getObjectByIdentity(oid);
 		assertEquals("check graph structure", "A [(A -> A), (A -> B [(B -> C [])]), (A
-> C [])]", retrieved.toString());



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