Author: julien(a)jboss.com
Date: 2007-03-07 17:58:37 -0500 (Wed, 07 Mar 2007)
New Revision: 6590
Modified:
trunk/common/src/main/org/jboss/portal/test/common/ObjectLoaderTestCase.java
Log:
improved a bit the test cases for object laoder
Modified: trunk/common/src/main/org/jboss/portal/test/common/ObjectLoaderTestCase.java
===================================================================
---
trunk/common/src/main/org/jboss/portal/test/common/ObjectLoaderTestCase.java 2007-03-07
22:51:04 UTC (rev 6589)
+++
trunk/common/src/main/org/jboss/portal/test/common/ObjectLoaderTestCase.java 2007-03-07
22:58:37 UTC (rev 6590)
@@ -136,11 +136,25 @@
assertEquals(1, l2.loadCount);
//
- Object o3 = o_l.getObject(ctx, 1);
- assertEquals(o3, null);
+ o0 = o_l.getObject(ctx, 0);
+ assertEquals(o0, l0.o);
assertEquals(1, l0.loadCount);
assertEquals(1, l1.loadCount);
assertEquals(1, l2.loadCount);
+
+ //
+ o2 = o_l.getObject(ctx, 2);
+ assertEquals(o2, l2.o);
+ assertEquals(1, l0.loadCount);
+ assertEquals(1, l1.loadCount);
+ assertEquals(1, l2.loadCount);
+
+ //
+ o1 = o_l.getObject(ctx, 1);
+ assertEquals(o1, null);
+ assertEquals(1, l0.loadCount);
+ assertEquals(1, l1.loadCount);
+ assertEquals(1, l2.loadCount);
}
public void testLoadSync() throws Exception
@@ -173,12 +187,27 @@
assertEquals(1, l1.loadCount);
assertEquals(1, l2.loadCount);
+
//
- Object o3 = o_l.getObject(ctx, 1);
- assertEquals(o3, null);
+ o0 = o_l.getObject(ctx, 0);
+ assertEquals(o0, l0.o);
assertEquals(1, l0.loadCount);
assertEquals(1, l1.loadCount);
assertEquals(1, l2.loadCount);
+
+ //
+ o2 = o_l.getObject(ctx, 2);
+ assertEquals(o2, l2.o);
+ assertEquals(1, l0.loadCount);
+ assertEquals(1, l1.loadCount);
+ assertEquals(1, l2.loadCount);
+
+ //
+ o1 = o_l.getObject(ctx, 1);
+ assertEquals(o1, null);
+ assertEquals(1, l0.loadCount);
+ assertEquals(1, l1.loadCount);
+ assertEquals(1, l2.loadCount);
}
public void testLoadOne() throws Exception