jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1232862 - /jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
Date Wed, 18 Jan 2012 12:42:32 GMT
Author: thomasm
Date: Wed Jan 18 12:42:31 2012
New Revision: 1232862

URL: http://svn.apache.org/viewvc?rev=1232862&view=rev
Log:
Test case for adding a property twice (to be documented).

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

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java?rev=1232862&r1=1232861&r2=1232862&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
Wed Jan 18 12:42:31 2012
@@ -53,7 +53,24 @@ public class MoveNodeTest extends MultiM
         commit("/", "+ \"test/c\": 123");
         Assert.assertEquals("{c:123,a,b,c}", getNode("/test"));
         assertJournal("+\"/test/c\":123");
+    }
+
+    @Test
+    public void addPropertyTwice() {
+        if (!isMemoryKernel(mk)) {
+            return;
+        }
 
+        commit("/", "+ \"test/c\": 123");
+
+        // duplicate add property can fail
+        // TODO document that both is fine
+        try {
+            commit("/", "+ \"test/c\": 123");
+            Assert.fail();
+        } catch (MicroKernelException e) {
+            // expected
+        }
         Assert.assertEquals("{c:123,a,b,c}", getNode("/test"));
     }
 



Mime
View raw message