db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattba...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/otm SwizzleTests.java CopyTest.java
Date Tue, 08 Jul 2003 23:37:54 GMT
mattbaird    2003/07/08 16:37:53

  Modified:    src/test/org/apache/ojb/otm SwizzleTests.java CopyTest.java
  Log:
  fix test cases for new API
  
  Revision  Changes    Path
  1.7       +1 -0      db-ojb/src/test/org/apache/ojb/otm/SwizzleTests.java
  
  Index: SwizzleTests.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/otm/SwizzleTests.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SwizzleTests.java	8 Jul 2003 22:41:48 -0000	1.6
  +++ SwizzleTests.java	8 Jul 2003 23:37:53 -0000	1.7
  @@ -222,6 +222,7 @@
   		System.out.println("a2.getB().getValue1()" + a2.getB().getValue1());
   		assertTrue(a2.getB().getValue1().equals("goodbye there"));
   		tx.commit();
  +		clearTestData();		
   	}
   
   	private void clearTestData() throws LockingException
  
  
  
  1.2       +6 -5      db-ojb/src/test/org/apache/ojb/otm/CopyTest.java
  
  Index: CopyTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/otm/CopyTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CopyTest.java	7 Jul 2003 22:54:37 -0000	1.1
  +++ CopyTest.java	8 Jul 2003 23:37:53 -0000	1.2
  @@ -120,7 +120,7 @@
   
   	private void internalTest(ObjectCopyStrategy strategy, TestClassA a, TestClassB b)
   	{
  -		TestClassA copy = (TestClassA) strategy.copy(a, m_pb.getDescriptorRepository());
  +		TestClassA copy = (TestClassA) strategy.copy(a, m_pb);
   		assertTrue(a != copy);
   		assertTrue(copy.getOid().equals("someoid"));
   		assertTrue(copy.getValue1().equals("abc"));
  @@ -128,6 +128,7 @@
   		assertTrue(copy.getValue3() == 5);
   		assertTrue(copy.getB() != b);
   		assertTrue(copy.getB().getOid().equals("boid"));
  +		System.out.println("copy.getB().getValue1(): " + copy.getB().getValue1());
   		assertTrue(copy.getB().getValue1().equals("hi there"));
   	}
   
  @@ -151,7 +152,7 @@
   
   	private void internalTest2(ObjectCopyStrategy strategy, Zoo zoo)
   	{
  -		Zoo copy = (Zoo) strategy.copy(zoo, m_pb.getDescriptorRepository());
  +		Zoo copy = (Zoo) strategy.copy(zoo, m_pb);
   		assertTrue(zoo != copy);
   		assertTrue(zoo.getAnimals().size() == copy.getAnimals().size());
   	}
  @@ -179,7 +180,7 @@
   		{
   			TestClassA tca = generateTestData();
   			TestClassB tcb = tca.getB();
  -			TestClassA copy = (TestClassA) m_scs.copy(tca, m_pb.getDescriptorRepository());
  +			TestClassA copy = (TestClassA) m_scs.copy(tca, m_pb);
   		}
   		long stop = System.currentTimeMillis();
   		System.out.println("testSerializedCopy took: " + (stop - start));
  @@ -188,7 +189,7 @@
   		{
   			TestClassA tca = generateTestData();
   			TestClassB tcb = tca.getB();
  -			TestClassA copy = (TestClassA) m_mdcs.copy(tca, m_pb.getDescriptorRepository());
  +			TestClassA copy = (TestClassA) m_mdcs.copy(tca, m_pb);
   		}
   		stop = System.currentTimeMillis();
   		System.out.println("testMetadataCopy took: " + (stop - start));
  @@ -197,7 +198,7 @@
   		{
   			TestClassA tca = generateTestData();
   			TestClassB tcb = tca.getB();
  -			TestClassA copy = (TestClassA) m_rcs.copy(tca, m_pb.getDescriptorRepository());
  +			TestClassA copy = (TestClassA) m_rcs.copy(tca, m_pb);
   		}
   		stop = System.currentTimeMillis();
   		System.out.println("testReflectiveCopy took: " + (stop - start));
  
  
  

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