jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r1213680 - /jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
Date Tue, 13 Dec 2011 13:30:13 GMT
Author: dpfister
Date: Tue Dec 13 13:30:13 2011
New Revision: 1213680

URL: http://svn.apache.org/viewvc?rev=1213680&view=rev
Log:
Replace '\r' (Mac OS line terminator) with '\n' (Unix line terminator)

Modified:
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java?rev=1213680&r1=1213679&r2=1213680&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConflictingMoveTest.java
Tue Dec 13 13:30:13 2011
@@ -16,16 +16,16 @@
  */
 package org.apache.jackrabbit.mk;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 /**
  * Test moving nodes.
  */
@@ -42,24 +42,10 @@ public class ConflictingMoveTest extends
     }
 
     @Test
-    public void collidingMove() {
-        String head = mk.getHeadRevision();
-
-        head = mk.commit("/", "+\"x\" : {} \r+\"y\" : {}\n", head, "");
-
-        try {
-            mk.commit("/", ">\"x\" : \"y\"", head, "");
-            fail("expected to fail since /y already exists");
-        } catch (MicroKernelException e) {
-            // expected
-        }
-    }
-
-    @Test
     public void conflictingMove() {
         String head = mk.getHeadRevision();
 
-        head = mk.commit("/", "+\"a\" : {} \r+\"b\" : {}\n", head, "");
+        head = mk.commit("/", "+\"a\" : {} \n+\"b\" : {}\n", head, "");
 
         String r1 = mk.commit("/", ">\"a\" : \"b/a\"", head, "");
         assertFalse(mk.nodeExists("/a", r1));
@@ -67,26 +53,27 @@ public class ConflictingMoveTest extends
         assertTrue(mk.nodeExists("/b/a", r1));
 
         try {
-            mk.commit("/", ">\"b\" : \"a/b\"", head, "");
-            fail("expected to fail since /a doesn't exist");
+            String r2 = mk.commit("/", ">\"b\" : \"a/b\"", head, "");
         } catch (MicroKernelException e) {
-            // expected
+            // expected to fail since /a doesn't exist anymore
+            return;
         }
+        fail();
     }
 
     @Test
     public void conflictingAddDelete() {
         String head = mk.getHeadRevision();
 
-        head = mk.commit("/", "+\"a\" : {} \r+\"b\" : {}\n", head, "");
+        head = mk.commit("/", "+\"a\" : {} \n+\"b\" : {}\n", head, "");
 
-        String r1 = mk.commit("/", "-\"b\" \r +\"a/x\" : {}", head, "");
+        String r1 = mk.commit("/", "-\"b\" \n +\"a/x\" : {}", head, "");
         assertFalse(mk.nodeExists("/b", r1));
         assertTrue(mk.nodeExists("/a", r1));
         assertTrue(mk.nodeExists("/a/x", r1));
 
         try {
-            mk.commit("/", "-\"a\" \r +\"b/x\" : {}", head, "");
+            String r2 = mk.commit("/", "-\"a\" \n +\"b/x\" : {}", head, "");
         } catch (MicroKernelException e) {
             // expected to fail since /b doesn't exist anymore
             return;



Mime
View raw message