jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1151063 - /jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Date Tue, 26 Jul 2011 11:09:25 GMT
Author: mduerig
Date: Tue Jul 26 11:09:24 2011
New Revision: 1151063

URL: http://svn.apache.org/viewvc?rev=1151063&view=rev
Log:
spi2microkernel (WIP)
- test: move

Modified:
    jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java

Modified: jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java?rev=1151063&r1=1151062&r2=1151063&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Tue Jul 26 11:09:24 2011
@@ -36,6 +36,7 @@ import org.junit.Test;
 import java.io.IOException;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 public class MicrokernelTest {
@@ -152,6 +153,19 @@ public class MicrokernelTest {
     }
 
     @Test
+    public void moveNode() {
+        MicroKernel mk = getMicroKernel();
+        String head = mk.getHeadRevision();
+        String node = "moveNode_" + System.currentTimeMillis();
+        String movedNode = "movedNode_" + System.currentTimeMillis();
+        head = mk.commit("/", "+\"" + node + "\" : {}", head, "");
+
+        head = mk.commit("/", ">\"" + node + "\" : \"" + movedNode + '\"', head, "");
+        assertFalse(mk.nodeExists('/' + node, head));
+        assertTrue(mk.nodeExists('/' + movedNode, head));
+    }
+
+    @Test
     public void removeProperty() {
         MicroKernel mk = getMicroKernel();
         String head = mk.getHeadRevision();



Mime
View raw message