[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/api ...
Manik Surtani
msurtani at jboss.com
Thu Jan 25 09:12:07 EST 2007
User: msurtani
Date: 07/01/25 09:12:07
Modified: tests/functional/org/jboss/cache/api CacheAPITest.java
NodeSPITest.java NodeAPITest.java
Log:
JBCACHE-948
Revision Changes Path
1.11 +2 -1 JBossCache/tests/functional/org/jboss/cache/api/CacheAPITest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheAPITest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/CacheAPITest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- CacheAPITest.java 11 Jan 2007 13:49:05 -0000 1.10
+++ CacheAPITest.java 25 Jan 2007 14:12:07 -0000 1.11
@@ -195,8 +195,9 @@
cache.getRoot().addChild(fqn);
assertTrue(cache.getRoot().hasChild(fqn));
- cache.removeNode(fqn);
+ assertEquals(true, cache.removeNode(fqn));
assertFalse(cache.getRoot().hasChild(fqn));
+ assertEquals(false, cache.removeNode(fqn));
}
/**
1.3 +7 -3 JBossCache/tests/functional/org/jboss/cache/api/NodeSPITest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeSPITest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/NodeSPITest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- NodeSPITest.java 11 Jan 2007 13:49:05 -0000 1.2
+++ NodeSPITest.java 25 Jan 2007 14:12:07 -0000 1.3
@@ -48,10 +48,14 @@
nodeB = nodeA.getChildDirect(B);// should work
assertEquals(A_B, nodeB.getFqn());
- cache.getRoot().removeChildDirect(A_B);// should work
+ assertEquals(true, cache.getRoot().removeChildDirect(A_B));// should work
+ assertEquals(false, cache.getRoot().removeChildDirect(A_B));// should work
- nodeA.removeChildDirect(B);// should work
- cache.getRoot().removeChildDirect(A);// should work
+ cache.put(A_B, "k", "v");
+ assertEquals(true, nodeA.removeChildDirect(B));// should work
+ assertEquals(false, nodeA.removeChildDirect(B));// should work
+ assertEquals(true, cache.getRoot().removeChildDirect(A.getLastElement()));
+ assertEquals(false, cache.getRoot().removeChildDirect(A.getLastElement()));
try
{
1.15 +4 -1 JBossCache/tests/functional/org/jboss/cache/api/NodeAPITest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeAPITest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/NodeAPITest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- NodeAPITest.java 11 Jan 2007 13:49:05 -0000 1.14
+++ NodeAPITest.java 25 Jan 2007 14:12:07 -0000 1.15
@@ -106,10 +106,13 @@
assertTrue(rootNode.getChildren().contains(nodeD));
assertEquals(2, rootNode.getChildren().size());
- rootNode.removeChild(A);
+ assertEquals(true, rootNode.removeChild(A));
assertFalse(rootNode.getChildren().contains(nodeA));
assertTrue(rootNode.getChildren().contains(nodeD));
assertEquals(1, rootNode.getChildren().size());
+
+ assertEquals("double remove", false, rootNode.removeChild(A));
+ assertEquals("double remove", false, rootNode.removeChild(A.getLastElement()));
}
public void testLocking() throws Exception
More information about the jboss-cvs-commits
mailing list