jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1337217 - /jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
Date Fri, 11 May 2012 15:44:34 GMT
Author: stefan
Date: Fri May 11 15:44:34 2012
New Revision: 1337217

URL: http://svn.apache.org/viewvc?rev=1337217&view=rev
Log:
OAK-12: Implement a test suite for the MicroKernel (WIP)

Modified:
    jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java

Modified: jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java?rev=1337217&r1=1337216&r2=1337217&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
(original)
+++ jackrabbit/oak/trunk/oak-it/mk/src/main/java/org/apache/jackrabbit/mk/test/MicroKernelIT.java
Fri May 11 15:44:34 2012
@@ -255,15 +255,27 @@ public class MicroKernelIT extends Abstr
     }
 
     @Test
+    public void copy() {
+        mk.commit("/", "*\"test\":\"testCopy\"", null, "");
+
+        assertTrue(mk.nodeExists("/testCopy", null));
+        assertTrue(mk.nodeExists("/test", null));
+
+        JSONObject obj = parseJSONObject(mk.getNodes("/test", null, 99, 0, -1, null));
+        JSONObject obj1 = parseJSONObject(mk.getNodes("/testCopy", null, 99, 0, -1, null));
+        assertEquals(obj, obj1);
+    }
+
+    @Test
     public void addAndCopy() {
         mk.commit("/",
                 "+\"x\":{}\n" +
-                "+\"y\":{}\n",
+                        "+\"y\":{}\n",
                 null, "");
 
         mk.commit("/",
                 "+\"x/a\":{}\n" +
-                "*\"x\":\"y/x1\"\n",
+                        "*\"x\":\"y/x1\"\n",
                 null, "");
 
         assertTrue(mk.nodeExists("/x/a", null));
@@ -593,7 +605,7 @@ public class MicroKernelIT extends Abstr
     public void moveNode() {
         String head = mk.getHeadRevision();
         String node = "moveNode_" + System.currentTimeMillis();
-        String movedNode = "movedNode_" + System.currentTimeMillis();
+        String movedNode = "movedNode_" + System.currentTimeMillis() + 1;
         head = mk.commit("/", "+\"" + node + "\" : {}", head, "");
 
         head = mk.commit("/", ">\"" + node + "\" : \"" + movedNode + '\"', head, "");



Mime
View raw message