[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/pojo ...
Ben Wang
bwang at jboss.com
Tue Feb 13 02:25:28 EST 2007
User: bwang
Date: 07/02/13 02:25:28
Modified: tests/functional/org/jboss/cache/pojo
NewReplicatedTest.java
Log:
Test for subclass loadtime option.
Revision Changes Path
1.2 +23 -0 JBossCache/tests/functional/org/jboss/cache/pojo/NewReplicatedTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NewReplicatedTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/NewReplicatedTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- NewReplicatedTest.java 13 Jan 2007 15:55:01 -0000 1.1
+++ NewReplicatedTest.java 13 Feb 2007 07:25:28 -0000 1.2
@@ -10,6 +10,8 @@
import org.jboss.cache.factories.UnitTestCacheFactory;
import org.jboss.cache.pojo.test.Person;
import org.jboss.cache.pojo.test.SpecialSerializedAddress;
+import org.jboss.cache.pojo.test.Student;
+import org.jboss.cache.pojo.test.Address;
import javax.naming.Context;
import java.util.Properties;
@@ -87,6 +89,27 @@
}
*/
+
+ public void testSubClass() throws Exception
+ {
+ log_.info("testsubClass() ....");
+ Student test = new Student();
+ test.setName("Ben");
+ test.setAge(10);
+ Address addr = new Address();
+ addr.setCity("Taipei");
+ addr.setZip(106);
+ test.setAddress(addr);
+ cache_.attach("/a", test);
+ Student result = (Student)cache_.find("/a");
+ assertEquals(" ", test, result);
+
+ Student remote = (Student)cache1_.find("/a");
+ System.out.println("Output on cache1: "+ result);
+ System.out.println("Output on cache2: "+ remote);
+ assertEquals("Age should be ", 10, remote.getAge());
+ }
+
public void testRemoteRemove() throws Exception
{
log_.info("testRemoteRemove() ....");
More information about the jboss-cvs-commits
mailing list