From: Ben W. <bw...@jb...> - 2006-05-05 23:34:35
|
User: bwang Date: 06/05/05 19:34:33 Modified: tests/functional/org/jboss/cache/aop NewReplicatedAopTest.java Log: Temp test case Revision Changes Path 1.6 +37 -0 JBossCache/tests/functional/org/jboss/cache/aop/NewReplicatedAopTest.java (In the diff below, changes in quantity of whitespace are not shown.) Index: NewReplicatedAopTest.java =================================================================== RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/NewReplicatedAopTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- NewReplicatedAopTest.java 9 Apr 2006 12:33:49 -0000 1.5 +++ NewReplicatedAopTest.java 5 May 2006 23:34:33 -0000 1.6 @@ -6,6 +6,9 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jboss.cache.PropertyConfigurator; +import org.jboss.cache.data.Address; +import org.jboss.cache.data.Course; +import org.jboss.cache.data.RandomString; import org.jboss.cache.aop.PojoCache; import org.jboss.cache.aop.test.Person; import org.jboss.cache.aop.test.Student; @@ -54,6 +57,40 @@ cache1_.stop(); } + public void testObjectSizePut() throws Exception + { + org.jboss.cache.data.Student student = (org.jboss.cache.data.Student)constructObject(); + cache_.putObject("/joe", student); + } + + + static Object constructObject() + { + org.jboss.cache.data.Student joe = new org.jboss.cache.data.Student(); + joe.setName("Joe"); + + Address add = new Address(); + add.setZip(94086); + add.setCity("Sunnyvale)"); + add.setStreet("Albertson"); + joe.setAddress(add); + + String str; + for(int i=0; i < 100; i++) + { + Course course = new Course(); + str = RandomString.randomstring(10,20); + course.setInstructor(str); + str = RandomString.randomstring(10,20); + course.setTitle(str); + str = RandomString.randomstring(10,20); + course.setRoom(str); + joe.addCourse(course); + } + + return joe; + } + public void testRemoteRemove() throws Exception { log_.info("testRemoteRemove() ...."); |