jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1405041 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
Date Fri, 02 Nov 2012 16:36:28 GMT
Author: mduerig
Date: Fri Nov  2 16:36:28 2012
New Revision: 1405041

URL: http://svn.apache.org/viewvc?rev=1405041&view=rev
Log:
OAK-170: Child node state builder
test case for NodeBuilder.reset

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java?rev=1405041&r1=1405040&r2=1405041&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
Fri Nov  2 16:36:28 2012
@@ -114,4 +114,18 @@ public class MemoryNodeBuilderTest {
         assertEquals(0, child.getChildNodeCount()); // reconnect!
     }
 
+    @Test
+    public void testReset() {
+        NodeBuilder root = new MemoryNodeBuilder(BASE);
+        NodeBuilder child = root.child("x");
+        child.child("new");
+
+        assertTrue(child.hasChildNode("new"));
+        assertTrue(root.child("x").hasChildNode("new"));
+
+        root.reset(BASE);
+        assertFalse(child.hasChildNode("new"));
+        assertFalse(root.child("x").hasChildNode("new"));
+    }
+
 }



Mime
View raw message