jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1469271 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
Date Thu, 18 Apr 2013 10:35:10 GMT
Author: mduerig
Date: Thu Apr 18 10:35:09 2013
New Revision: 1469271

URL: http://svn.apache.org/r1469271
Log:
OAK-782: MemoryNodeBuilder.setNode() loses property values
updated test case to demonstrate cases for NodeState instances other then ModifiedNodeState

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=1469271&r1=1469270&r2=1469271&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
Thu Apr 18 10:35:09 2013
@@ -201,20 +201,18 @@ public class MemoryNodeBuilderTest {
     @Ignore("OAK-782")
     public void setNodeTest() {
         MemoryNodeBuilder rootBuilder = new MemoryNodeBuilder(EmptyNodeState.EMPTY_NODE);
-        MemoryNodeBuilder aBuilder = new MemoryNodeBuilder(EmptyNodeState.EMPTY_NODE);
-        aBuilder.child("b").setProperty("c", "cValue");
-        rootBuilder.setNode("a", aBuilder.getNodeState());
+        rootBuilder.setNode("a", createBC(true));
 
 // Note: using the following way to construct the initial state makes the test pass
 //        rootBuilder = new MemoryNodeBuilder(EmptyNodeState.EMPTY_NODE);
-//        rootBuilder.child("a").child("b").setProperty("c", "cValue");
+//        rootBuilder.child("a").child("c").setProperty("c", "cValue");
 
-        NodeState b = rootBuilder.getNodeState().getChildNode("a").getChildNode("b");
+        NodeState b = rootBuilder.getNodeState().getChildNode("a").getChildNode("c");
         assertTrue(b.hasProperty("c"));
 
-        rootBuilder.child("a").child("b").setProperty("c2", "c2Value");
+        rootBuilder.child("a").child("c").setProperty("c2", "c2Value");
 
-        b = rootBuilder.getNodeState().getChildNode("a").getChildNode("b");
+        b = rootBuilder.getNodeState().getChildNode("a").getChildNode("c");
         assertTrue(b.hasProperty("c"));
         assertTrue(b.hasProperty("c2"));
     }



Mime
View raw message