Author: chetanm
Date: Fri Nov 11 12:13:51 2016
New Revision: 1769280

URL: http://svn.apache.org/viewvc?rev=1769280&view=rev
Log:
OAK-5079 - Diff would not work for bundled nodes when done without journal 
support

Test children diff

Modified:
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundledDocumentDifferTest.java

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundledDocumentDifferTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundledDocumentDifferTest.java?rev=1769280&r1=1769279&r2=1769280&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundledDocumentDifferTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundledDocumentDifferTest.java
 Fri Nov 11 12:13:51 2016
@@ -47,7 +47,7 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import static com.google.inject.internal.util.$ImmutableList.of;
+import static com.google.common.collect.ImmutableList.of;
 import static 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.SYS_PROP_DISABLE_JOURNAL;
 import static 
org.apache.jackrabbit.oak.plugins.document.TestUtils.childBuilder;
 import static org.apache.jackrabbit.oak.plugins.document.TestUtils.createChild;
@@ -181,7 +181,16 @@ public class BundledDocumentDifferTest {
 
     }
 
+    @Test
+    public void jsopDiff() throws Exception{
+        JsopWriter w = new JsopBuilder();
+        differ.diffChildren(of("a", "b"), of("b", "c"), w);
 
+        //removed a
+        //changed b
+        //added b
+        assertEquals("-\"a\"^\"b\":{}+\"c\":{}", w.toString());
+    }
 
     private NodeBuilder createContentStructure() {
         NodeBuilder builder = store.getRoot().builder();


Reply via email to