You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2009/05/27 12:26:48 UTC
svn commit: r779088 - in
/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi:
MoveTest.java WorkspaceMoveTest.java
Author: angela
Date: Wed May 27 10:26:48 2009
New Revision: 779088
URL: http://svn.apache.org/viewvc?rev=779088&view=rev
Log:
add TODO (most recent changes in jsr 283)
Modified:
jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java
jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/WorkspaceMoveTest.java
Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java?rev=779088&r1=779087&r2=779088&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/MoveTest.java Wed May 27 10:26:48 2009
@@ -235,7 +235,9 @@
* </code> to a location where a property already exists with same name.
* <br/>
* With JCR 1.0 this should throw an <code>{@link javax.jcr.ItemExistsException}</code>.
- * With JCR 2.0 this must succeed.
+ * With JCR 2.0 the support for same-named property and node is optional and
+ * the expected behaviour depends on the
+ * {@link Repository#OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED} descriptor.
*/
public void testMovePropertyExists() throws RepositoryException, NotExecutableException {
// try to create a property with the name of the node to be moved
@@ -247,6 +249,7 @@
throw new NotExecutableException("Cannot create property with name '" +nodeName2+ "' and value 'anyString' at move destination.");
}
+ // TODO: fix 2.0 behaviour according to the OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED descriptor
if ("1.0".equals(helper.getRepository().getDescriptor(Repository.SPEC_VERSION_DESC))) {
try {
// move the node
Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/WorkspaceMoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/WorkspaceMoveTest.java?rev=779088&r1=779087&r2=779088&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/WorkspaceMoveTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/WorkspaceMoveTest.java Wed May 27 10:26:48 2009
@@ -42,7 +42,9 @@
* with same name.
* <br/> <br/>
* With JCR 1.0 this should throw an <code>{@link javax.jcr.ItemExistsException}</code>.
- * With JCR 2.0 this must succeed.
+ * With JCR 2.0 the support for same-named property and node is optional and
+ * the expected behaviour depends on the
+ * {@link Repository#OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED} descriptor.
*/
public void testMovePropertyExists() throws RepositoryException, NotExecutableException {
// try to create a property with the name of the node to be moved
@@ -55,6 +57,7 @@
throw new NotExecutableException("Cannot create property with name '" +nodeName2+ "' and value 'anyString' at move destination.");
}
+ // TODO: fix 2.0 behaviour according to the OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED descriptor
if ("1.0".equals(helper.getRepository().getDescriptor(Repository.SPEC_VERSION_DESC))) {
try {
// move the node
@@ -79,6 +82,7 @@
throw new NotExecutableException("Cannot create property with name '" +nodeName2+ "' and value 'anyString' at move destination.");
}
+ // TODO: fix 2.0 behaviour according to the OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED descriptor
// workspace-move the node (must succeed)
doMove(moveNode.getPath(), destProperty.getPath());
if ("1.0".equals(helper.getRepository().getDescriptor(Repository.SPEC_VERSION_DESC))) {