jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r156984 [2/3] - in incubator/jackrabbit/trunk: applications/test/repository/nodetypes/ applications/test/workspaces/default/ applications/test/workspaces/test/ src/test/org/apache/jackrabbit/test/api/ src/test/org/apache/jackrabbit/test/api/nodetype/
Date Thu, 10 Mar 2005 19:38:03 GMT
Added: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDateTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDateTest.java?view=auto&rev=156984
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDateTest.java (added)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDateTest.java Thu Mar 10 11:37:51 2005
@@ -0,0 +1,290 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.test.api.nodetype;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
+
+import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.Session;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.StringValue;
+import javax.jcr.BinaryValue;
+import java.text.ParseException;
+
+/**
+ * Test of <code>NodeType.canSetProperty(String propertyName, Value
+ * value)</code> and <code>NodeType.canSetProperty(String propertyName, Value[]
+ * values)</code> where property is of type Date.
+ *
+ * @test
+ * @sources CanSetPropertyDateTest.java
+ * @executeClass org.apache.jackrabbit.test.api.nodetype.CanSetPropertyDateTest
+ * @keywords level1
+ */
+public class CanSetPropertyDateTest extends AbstractJCRTest {
+    /**
+     * The session we use for the tests
+     */
+    private Session session;
+
+    /**
+     * Sets up the fixture for the test cases.
+     */
+    protected void setUp() throws Exception {
+        isReadOnly = true;
+        super.setUp();
+
+        session = helper.getReadOnlySession();
+    }
+
+    /**
+     * Releases the session aquired in {@link #setUp()}.
+     */
+    protected void tearDown() throws Exception {
+        if (session != null) {
+            session.logout();
+        }
+        super.tearDown();
+    }
+
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value value)
+     * returns true if value and its type are convertible to DateValue.
+     */
+    public void testConversions()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DATE, false, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No date property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value anyStringValue = NodeTypeUtil.getValueOfType(PropertyType.STRING);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Date and value is a StringValue " +
+                "not in date format",
+                nodeType.canSetProperty(propDef.getName(), anyStringValue));
+
+        StringValue dateStringValue =
+                new StringValue(NodeTypeUtil.getValueOfType(PropertyType.DATE).getString());
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Date and value is a StringValue " +
+                "in date format",
+                nodeType.canSetProperty(propDef.getName(), dateStringValue));
+
+        Value anyBinaryValue = NodeTypeUtil.getValueOfType(PropertyType.BINARY);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Date and value is a UTF-8 " +
+                "BinaryValue not in date format",
+                nodeType.canSetProperty(propDef.getName(), anyBinaryValue));
+
+        BinaryValue dateBinaryValue =
+                new BinaryValue(NodeTypeUtil.getValueOfType(PropertyType.DATE).getString());
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Date and value is a UTF-8 " +
+                "BinaryValue in date format",
+                nodeType.canSetProperty(propDef.getName(), dateBinaryValue));
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Date and value is a DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValue));
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Date and value is a DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValue));
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Date and value is a LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValue));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Date and value is a BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValue));
+
+        Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Date and value is a NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameValue));
+
+        Value pathValue = NodeTypeUtil.getValueOfType(PropertyType.PATH);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Date and value is a PathValue",
+                nodeType.canSetProperty(propDef.getName(), pathValue));
+    }
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value[] values)
+     * returns true if all values and its types are convertible to DateValue.
+     */
+    public void testConversionsMultiple()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DATE, true, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple string property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+
+        Value anyStringValue = NodeTypeUtil.getValueOfType(PropertyType.STRING);
+        // note: for assertFalse, use first value of requested type to check
+        // if not only first value is checked
+        Value anyStringValues[] = {dateValue, anyStringValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Date and values are of type StringValue " +
+                "not in date format",
+                nodeType.canSetProperty(propDef.getName(), anyStringValues));
+
+        StringValue dateStringValue =
+                new StringValue(NodeTypeUtil.getValueOfType(PropertyType.DATE).getString());
+        Value dateStringValues[] = {dateStringValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Date and values are of type StringValue " +
+                "in date format",
+                nodeType.canSetProperty(propDef.getName(), dateStringValues));
+
+        Value dateValues[] = {dateValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Date and values are of type DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValues));
+
+        Value anyBinaryValue = NodeTypeUtil.getValueOfType(PropertyType.BINARY);
+        Value anyBinaryValues[] = {dateValue, anyBinaryValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Date and values are of type BinaryValue" +
+                "in UTF-8 but not in date format",
+                nodeType.canSetProperty(propDef.getName(), anyBinaryValues));
+
+        BinaryValue dateBinaryValue =
+                new BinaryValue(NodeTypeUtil.getValueOfType(PropertyType.DATE).getString());
+        Value dateBinaryValues[] = {dateBinaryValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Date and values are of type BinaryValue" +
+                "in UTF-8 and in date format",
+                nodeType.canSetProperty(propDef.getName(), dateBinaryValues));
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+        Value doubleValues[] = {doubleValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Date and values are of type DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValues));
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+        Value longValues[] = {longValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Date and values are of type LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValues));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        Value booleanValues[] = {dateValue, booleanValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Date and values are of type BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValues));
+
+        Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+        Value nameValues[] = {dateValue, nameValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Date and values are of type NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameValues));
+
+        Value pathValue = NodeTypeUtil.getValueOfType(PropertyType.PATH);
+        Value pathValues[] = {dateValue, pathValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Date and values are of type PathValue",
+                nodeType.canSetProperty(propDef.getName(), pathValues));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value value) returns false
+     * if value does not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraint()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DATE, false, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No date property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No date property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+        assertFalse("canSetProperty(String propertyName, Value value) must " +
+                "return false if value does not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), value));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value[] values) returns
+     * false if values do not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraintMultiple()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DATE, true, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple date property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No multiple date property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+        Value values[] = {value};
+
+        assertFalse("canSetProperty(String propertyName, Value[] values) must " +
+                "return false if values do not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), values));
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDateTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDoubleTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDoubleTest.java?view=auto&rev=156984
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDoubleTest.java (added)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDoubleTest.java Thu Mar 10 11:37:51 2005
@@ -0,0 +1,288 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.test.api.nodetype;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
+
+import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.Session;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.StringValue;
+import javax.jcr.BinaryValue;
+import java.text.ParseException;
+
+/**
+ * Test of <code>NodeType.canSetProperty(String propertyName, Value
+ * value)</code> and <code>NodeType.canSetProperty(String propertyName, Value[]
+ * values)</code> where property is of type Double.
+ *
+ * @test
+ * @sources CanSetPropertyDoubleTest.java
+ * @executeClass org.apache.jackrabbit.test.api.nodetype.CanSetPropertyDoubleTest
+ * @keywords level1
+ */
+public class CanSetPropertyDoubleTest extends AbstractJCRTest {
+    /**
+     * The session we use for the tests
+     */
+    private Session session;
+
+    /**
+     * Sets up the fixture for the test cases.
+     */
+    protected void setUp() throws Exception {
+        isReadOnly = true;
+        super.setUp();
+
+        session = helper.getReadOnlySession();
+    }
+
+    /**
+     * Releases the session aquired in {@link #setUp()}.
+     */
+    protected void tearDown() throws Exception {
+        if (session != null) {
+            session.logout();
+        }
+        super.tearDown();
+    }
+
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value value)
+     * returns true if value and its type are convertible to DoubleValue.
+     */
+    public void testConversions()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DOUBLE, false, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No double property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value anyStringValue = NodeTypeUtil.getValueOfType(PropertyType.STRING);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Double and value is a StringValue " +
+                "that is not convertible to a DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), anyStringValue));
+
+        Value doubleStringValue =
+                new StringValue(NodeTypeUtil.getValueOfType(PropertyType.DOUBLE).getString());
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Double and value is a StringValue " +
+                "that is convertible to a DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleStringValue));
+
+        Value anyBinaryValue = NodeTypeUtil.getValueOfType(PropertyType.BINARY);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Double and value is a UTF-8 " +
+                "BinaryValue that is not convertible to a DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), anyBinaryValue));
+
+        Value doubleBinaryValue =
+                new BinaryValue(NodeTypeUtil.getValueOfType(PropertyType.DOUBLE).getString());
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Double and value is a UTF-8 " +
+                "BinaryValue that is convertible to a DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleBinaryValue));
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Double and value is a DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValue));
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Double and value is a DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValue));
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Double and value is a LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValue));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Double and value is a BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValue));
+
+        Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Double and value is a NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameValue));
+
+        Value pathValue = NodeTypeUtil.getValueOfType(PropertyType.PATH);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Double and value is a PathValue",
+                nodeType.canSetProperty(propDef.getName(), pathValue));
+    }
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value[] values)
+     * returns true if all values and its types are convertible to DoubleValue.
+     */
+    public void testConversionsMultiple()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DOUBLE, true, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple double property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+
+        Value anyStringValue = NodeTypeUtil.getValueOfType(PropertyType.STRING);
+        Value anyStringValues[] = {doubleValue, anyStringValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Double and values are of type StringValue " +
+                "that are not convertible to DoubleValues",
+                nodeType.canSetProperty(propDef.getName(), anyStringValues));
+
+        Value doubleStringValue =
+                new StringValue(NodeTypeUtil.getValueOfType(PropertyType.DOUBLE).getString());
+        Value doubleStringValues[] = {doubleStringValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Double and values are of type StringValue " +
+                "that are convertible to DoubleValues",
+                nodeType.canSetProperty(propDef.getName(), doubleStringValues));
+
+        Value anyBinaryValue = NodeTypeUtil.getValueOfType(PropertyType.BINARY);
+        Value anyBinaryValues[] = {doubleValue, anyBinaryValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Double and values are of type BinaryValue " +
+                "that are not convertible to DoubleValues",
+                nodeType.canSetProperty(propDef.getName(), anyBinaryValues));
+
+        Value doubleBinaryValue =
+                new BinaryValue(NodeTypeUtil.getValueOfType(PropertyType.DOUBLE).getString());
+        Value doubleBinaryValues[] = {doubleBinaryValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Double and values are of type BinaryValue " +
+                "that are convertible to DoubleValues",
+                nodeType.canSetProperty(propDef.getName(), doubleBinaryValues));
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+        Value dateValues[] = {dateValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Double and values are of type DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValues));
+
+        Value doubleValues[] = {doubleValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Double and values are of type DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValues));
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+        Value longValues[] = {longValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Double and values are of type LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValues));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        Value booleanValues[] = {doubleValue, booleanValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Double and values are of type BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValues));
+
+        Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+        Value nameValues[] = {doubleValue, nameValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Double and values are of type NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameValues));
+
+        Value pathValue = NodeTypeUtil.getValueOfType(PropertyType.PATH);
+        Value pathValues[] = {doubleValue, pathValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Double and values are of type PathValue",
+                nodeType.canSetProperty(propDef.getName(), pathValues));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value value) returns false
+     * if value does not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraint()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DOUBLE, false, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No double property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No double property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+        assertFalse("canSetProperty(String propertyName, Value value) must " +
+                "return false if value does not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), value));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value[] values) returns
+     * false if values do not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraintMultiple()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DOUBLE, true, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple double property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No multiple double property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+        Value values[] = {value};
+
+        assertFalse("canSetProperty(String propertyName, Value[] values) must " +
+                "return false if values do not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), values));
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyDoubleTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyLongTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyLongTest.java?view=auto&rev=156984
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyLongTest.java (added)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyLongTest.java Thu Mar 10 11:37:51 2005
@@ -0,0 +1,288 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.test.api.nodetype;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
+
+import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.Session;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.StringValue;
+import javax.jcr.BinaryValue;
+import java.text.ParseException;
+
+/**
+ * Test of <code>NodeType.canSetProperty(String propertyName, Value
+ * value)</code> and <code>NodeType.canSetProperty(String propertyName, Value[]
+ * values)</code> where property is of type Double.
+ *
+ * @test
+ * @sources CanSetPropertyLongTest.java
+ * @executeClass org.apache.jackrabbit.test.api.nodetype.CanSetPropertyLongTest
+ * @keywords level1
+ */
+public class CanSetPropertyLongTest extends AbstractJCRTest {
+    /**
+     * The session we use for the tests
+     */
+    private Session session;
+
+    /**
+     * Sets up the fixture for the test cases.
+     */
+    protected void setUp() throws Exception {
+        isReadOnly = true;
+        super.setUp();
+
+        session = helper.getReadOnlySession();
+    }
+
+    /**
+     * Releases the session aquired in {@link #setUp()}.
+     */
+    protected void tearDown() throws Exception {
+        if (session != null) {
+            session.logout();
+        }
+        super.tearDown();
+    }
+
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value value)
+     * returns true if value and its type are convertible to LongValue.
+     */
+    public void testConversions()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DOUBLE, false, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No long property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value anyStringValue = NodeTypeUtil.getValueOfType(PropertyType.STRING);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Long and value is a StringValue " +
+                "that is not convertible to a LongValue",
+                nodeType.canSetProperty(propDef.getName(), anyStringValue));
+
+        Value longStringValue =
+                new StringValue(NodeTypeUtil.getValueOfType(PropertyType.LONG).getString());
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Long and value is a StringValue " +
+                "that is convertible to a LongValue",
+                nodeType.canSetProperty(propDef.getName(), longStringValue));
+
+        Value anyBinaryValue = NodeTypeUtil.getValueOfType(PropertyType.BINARY);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Long and value is a UTF-8 " +
+                "BinaryValue that is not convertible to a LongValue",
+                nodeType.canSetProperty(propDef.getName(), anyBinaryValue));
+
+        Value longBinaryValue =
+                new BinaryValue(NodeTypeUtil.getValueOfType(PropertyType.LONG).getString());
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Long and value is a UTF-8 " +
+                "BinaryValue that is convertible to a LongValue",
+                nodeType.canSetProperty(propDef.getName(), longBinaryValue));
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Long and value is a DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValue));
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Long and value is a DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValue));
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Long and value is a LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValue));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Long and value is a BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValue));
+
+        Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Long and value is a NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameValue));
+
+        Value pathValue = NodeTypeUtil.getValueOfType(PropertyType.PATH);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Long and value is a PathValue",
+                nodeType.canSetProperty(propDef.getName(), pathValue));
+    }
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value[] values)
+     * returns true if all values and its types are convertible to LongValue.
+     */
+    public void testConversionsMultiple()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.DOUBLE, true, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple long property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+
+        Value anyStringValue = NodeTypeUtil.getValueOfType(PropertyType.STRING);
+        Value anyStringValues[] = {longValue, anyStringValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Long and values are of type StringValue " +
+                "that are not convertible to LongValues",
+                nodeType.canSetProperty(propDef.getName(), anyStringValues));
+
+        Value longStringValue =
+                new StringValue(NodeTypeUtil.getValueOfType(PropertyType.LONG).getString());
+        Value longStringValues[] = {longStringValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Long and values are of type StringValue " +
+                "that are convertible to LongValues",
+                nodeType.canSetProperty(propDef.getName(), longStringValues));
+
+        Value anyBinaryValue = NodeTypeUtil.getValueOfType(PropertyType.BINARY);
+        Value anyBinaryValues[] = {longValue, anyBinaryValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Long and values are of type BinaryValue " +
+                "that are not convertible to LongValues",
+                nodeType.canSetProperty(propDef.getName(), anyBinaryValues));
+
+        Value longBinaryValue =
+                new BinaryValue(NodeTypeUtil.getValueOfType(PropertyType.LONG).getString());
+        Value longBinaryValues[] = {longBinaryValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Long and values are of type BinaryValue " +
+                "that are convertible to LongValues",
+                nodeType.canSetProperty(propDef.getName(), longBinaryValues));
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+        Value dateValues[] = {dateValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Long and values are of type DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValues));
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+        Value doubleValues[] = {doubleValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Long and values are of type DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValues));
+
+        Value longValues[] = {longValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Long and values are of type LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValues));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        Value booleanValues[] = {longValue, booleanValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Long and values are of type BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValues));
+
+        Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+        Value nameValues[] = {longValue, nameValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Long and values are of type NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameValues));
+
+        Value pathValue = NodeTypeUtil.getValueOfType(PropertyType.PATH);
+        Value pathValues[] = {longValue, pathValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Long and values are of type PathValue",
+                nodeType.canSetProperty(propDef.getName(), pathValues));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value value) returns false
+     * if value does not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraint()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.LONG, false, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No long property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No long property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+        assertFalse("canSetProperty(String propertyName, Value value) must " +
+                "return false if value does not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), value));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value[] values) returns
+     * false if values do not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraintMultiple()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.LONG, true, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple long property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No multiple long property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+        Value values[] = {value};
+
+        assertFalse("canSetProperty(String propertyName, Value[] values) must " +
+                "return false if values do not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), values));
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyLongTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyMultipleTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyMultipleTest.java?view=auto&rev=156984
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyMultipleTest.java (added)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyMultipleTest.java Thu Mar 10 11:37:51 2005
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.test.api.nodetype;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
+
+import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.Session;
+import javax.jcr.RepositoryException;
+import javax.jcr.PropertyType;
+import javax.jcr.Value;
+
+/**
+ * Test of <code>NodeType.canSetProperty(String propertyName, Value[]
+ * values)</code>
+ *
+ * @test
+ * @sources CanSetPropertyMultipleTest.java
+ * @executeClass org.apache.jackrabbit.test.api.nodetype.CanSetPropertyMultipleTest
+ * @keywords level1
+ */
+public class CanSetPropertyMultipleTest extends AbstractJCRTest {
+    /**
+     * The session we use for the tests
+     */
+    private Session session;
+
+
+    /**
+     * Sets up the fixture for the test cases.
+     */
+    protected void setUp() throws Exception {
+        isReadOnly = true;
+        super.setUp();
+
+        session = helper.getReadOnlySession();
+    }
+
+    /**
+     * Releases the session aquired in {@link #setUp()}.
+     */
+    protected void tearDown() throws Exception {
+        if (session != null) {
+            session.logout();
+        }
+        super.tearDown();
+    }
+
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value[] values)
+     * returns false if the property is protected.
+     */
+    public void testReturnFalseBecauseIsProtected()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.UNDEFINED, true, true, false, false);
+
+        // will never happen since at least jcr:mixinTypes of nt:base accomplish the request
+        if (propDef == null) {
+            throw new NotExecutableException("No protected, multiple property def found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+        Value value = NodeTypeUtil.getValueOfType(propDef.getRequiredType());
+        Value values[] = {value, value};
+
+        assertFalse("canSetProperty(String propertyName, Value[] values) must " +
+                "return true if the property is protected.",
+                nodeType.canSetProperty(propDef.getName(), values));
+    }
+
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value[] values)
+     * returns false if the property is not multiple
+     */
+    public void testReturnFalseBecauseIsNotMultiple()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.UNDEFINED, false, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No not multiple, not protected property def found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+        Value value = NodeTypeUtil.getValueOfType(propDef.getRequiredType());
+        Value values[] = {value};
+
+        assertFalse("canSetProperty(String propertyName, Value[] values) must " +
+                "return false if the property is not multiple",
+                nodeType.canSetProperty(propDef.getName(), values));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value[] values) where values
+     * is null returns the same as canRemoveItem
+     */
+    public void testMultipleValuesNull()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.UNDEFINED, true, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No not protected, multiple property def found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+        assertEquals("nodeType.canSetProperty(String propertyName, Value[] values) " +
+                "where values is null must return the same result as " +
+                "nodeType.canRemoveItem(String propertyName)",
+                nodeType.canRemoveItem(propDef.getName()),
+                nodeType.canSetProperty(propDef.getName(), (Value[]) null));
+    }
+
+
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyMultipleTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyNameTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyNameTest.java?view=auto&rev=156984
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyNameTest.java (added)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyNameTest.java Thu Mar 10 11:37:51 2005
@@ -0,0 +1,300 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.test.api.nodetype;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
+
+import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.Session;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.StringValue;
+import javax.jcr.BinaryValue;
+import javax.jcr.PathValue;
+import java.text.ParseException;
+
+/**
+ * Test of <code>NodeType.canSetProperty(String propertyName, Value
+ * value)</code> and <code>NodeType.canSetProperty(String propertyName, Value[]
+ * values)</code> where property is of type Name.
+ *
+ * @test
+ * @sources CanSetPropertyNameTest.java
+ * @executeClass org.apache.jackrabbit.test.api.nodetype.CanSetPropertyNameTest
+ * @keywords level1
+ */
+public class CanSetPropertyNameTest extends AbstractJCRTest {
+    /**
+     * The session we use for the tests
+     */
+    private Session session;
+
+    /**
+     * Sets up the fixture for the test cases.
+     */
+    protected void setUp() throws Exception {
+        isReadOnly = true;
+        super.setUp();
+
+        session = helper.getReadOnlySession();
+    }
+
+    /**
+     * Releases the session aquired in {@link #setUp()}.
+     */
+    protected void tearDown() throws Exception {
+        if (session != null) {
+            session.logout();
+        }
+        super.tearDown();
+    }
+
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value value)
+     * returns true if value and its type are convertible to NameValue.
+     */
+    public void testConversions()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.NAME, false, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No name property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value nameStringValue = new StringValue("abc");
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Name and value is a StringValue " +
+                "that is convertible to a NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameStringValue));
+
+        Value noNameStringValue = new StringValue("a:b:c");
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Name and value is a StringValue " +
+                "that is not convertible to a NameValue",
+                nodeType.canSetProperty(propDef.getName(), noNameStringValue));
+
+        Value nameBinaryValue = new BinaryValue("abc");
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Name and value is a UTF-8 " +
+                "BinaryValue that is convertible to a NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameBinaryValue));
+
+        Value noNameBinaryValue = new BinaryValue("a:b:c");
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Name and value is a UTF-8 " +
+                "BinaryValue that is not convertible to a NameValue",
+                nodeType.canSetProperty(propDef.getName(), noNameBinaryValue));
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Name and value is a DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValue));
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Name and value is a DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValue));
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Name and value is a LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValue));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Name and value is a BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValue));
+
+        Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Name and value is a NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameValue));
+
+        Value namePathValue = PathValue.valueOf("abc");
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Name and value is a PathValue " +
+                "if Path is relative, is one element long and has no index",
+                nodeType.canSetProperty(propDef.getName(), namePathValue));
+
+        Value noNamePathValue = PathValue.valueOf("/abc");
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Name and value is a PathValue " +
+                "if Path is not relative, is more than one element long or has an index",
+                nodeType.canSetProperty(propDef.getName(), noNamePathValue));
+    }
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value[] values)
+     * returns true if all values and its types are convertible to NameValue.
+     */
+    public void testConversionsMultiple()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.NAME, true, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple name property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+
+        Value nameStringValue = new StringValue("abc");
+        Value nameStringValues[] = {nameStringValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Name and values are of type StringValue " +
+                "that are convertible to NameValues",
+                nodeType.canSetProperty(propDef.getName(), nameStringValues));
+
+        Value notNameStringValue = new StringValue("a:b:c");
+        Value notNameStringValues[] = {nameValue, notNameStringValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Name and values are of type StringValue " +
+                "that are not convertible to NameValues ",
+                nodeType.canSetProperty(propDef.getName(), notNameStringValues));
+
+        Value nameBinaryValue = new BinaryValue("abc");
+        Value nameBinaryValues[] = {nameBinaryValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Name and values are of type BinaryValue " +
+                "that are convertible to NameValues",
+                nodeType.canSetProperty(propDef.getName(), nameBinaryValues));
+
+        Value notNameBinaryValue = new BinaryValue("a:b:c");
+        Value notNameBinaryValues[] = {nameValue, notNameBinaryValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Name and values are of type BinaryValue " +
+                "that are not convertible to NameValues",
+                nodeType.canSetProperty(propDef.getName(), notNameBinaryValues));
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+        Value dateValues[] = {nameValue, dateValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Name and values are of type DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValues));
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+        Value doubleValues[] = {nameValue, doubleValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Name and values are of type DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValues));
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+        Value longValues[] = {nameValue, longValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Name and values are of type LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValues));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        Value booleanValues[] = {booleanValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Name and values are of type BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValues));
+
+        Value nameValues[] = {nameValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Name and values are of type NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameValues));
+
+        Value namePathValue = PathValue.valueOf("abc");
+        Value namePathValues[] = {namePathValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Name and values are of type PathValue " +
+                "if Path is relative, is one element long and has no index",
+                nodeType.canSetProperty(propDef.getName(), namePathValues));
+
+        Value notNamePathValue = PathValue.valueOf("/abc");
+        Value notNamePathValues[] = {nameValue, notNamePathValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Name and values are of type PathValue " +
+                "if Path is not relative, is more than one element long or has an index",
+                nodeType.canSetProperty(propDef.getName(), notNamePathValues));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value value) returns false
+     * if value does not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraint()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.NAME, false, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No name property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No name property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+        assertFalse("canSetProperty(String propertyName, Value value) must " +
+                "return false if value does not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), value));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value[] values) returns
+     * false if values do not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraintMultiple()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.NAME, true, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple name property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No multiple name property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+        Value values[] = {value};
+
+        assertFalse("canSetProperty(String propertyName, Value[] values) must " +
+                "return false if values do not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), values));
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyNameTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java?view=auto&rev=156984
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java (added)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java Thu Mar 10 11:37:51 2005
@@ -0,0 +1,292 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.test.api.nodetype;
+
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
+
+import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.Session;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.StringValue;
+import javax.jcr.BinaryValue;
+import javax.jcr.PathValue;
+import java.text.ParseException;
+
+/**
+ * Test of <code>NodeType.canSetProperty(String propertyName, Value
+ * value)</code> and <code>NodeType.canSetProperty(String propertyNa  me,
+ * Value[] values)</code> where property is of type Path.
+ *
+ * @test
+ * @sources CanSetPropertyPathPath.java
+ * @executeClass org.apache.jackrabbit.test.api.nodetype.CanSetPropertyPathTest
+ * @keywords level1
+ */
+public class CanSetPropertyPathTest extends AbstractJCRTest {
+    /**
+     * The session we use for the tests
+     */
+    private Session session;
+
+    /**
+     * Sets up the fixture for the test cases.
+     */
+    protected void setUp() throws Exception {
+        isReadOnly = true;
+        super.setUp();
+
+        session = helper.getReadOnlySession();
+    }
+
+    /**
+     * Releases the session aquired in {@link #setUp()}.
+     */
+    protected void tearDown() throws Exception {
+        if (session != null) {
+            session.logout();
+        }
+        super.tearDown();
+    }
+
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value value)
+     * returns true if value and its type are convertible to PathValue.
+     */
+    public void testConversions()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.PATH, false, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No path property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value pathStringValue = new StringValue("abc");
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Path and value is a StringValue " +
+                "that is convertible to a PathValue",
+                nodeType.canSetProperty(propDef.getName(), pathStringValue));
+
+        Value noPathStringValue = new StringValue("a:b:c");
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Path and value is a StringValue " +
+                "that is not convertible to a PathValue",
+                nodeType.canSetProperty(propDef.getName(), noPathStringValue));
+
+        Value pathBinaryValue = new BinaryValue("abc");
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Path and value is a UTF-8 " +
+                "BinaryValue that is convertible to a PathValue",
+                nodeType.canSetProperty(propDef.getName(), pathBinaryValue));
+
+        Value noPathBinaryValue = new BinaryValue("a:b:c");
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Path and value is a BinaryValue" +
+                "that is not convertible to a PathValue",
+                nodeType.canSetProperty(propDef.getName(), noPathBinaryValue));
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Path and value is a DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValue));
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Path and value is a DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValue));
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Path and value is a LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValue));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Path and value is a BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValue));
+
+        Value pathValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Path and value is a NameValue",
+                nodeType.canSetProperty(propDef.getName(), pathValue));
+
+        Value pathPathValue = PathValue.valueOf("abc");
+        assertTrue("canSetProperty(String propertyName, Value value) must return " +
+                "true if the property is of type Path and value is a PathValue " +
+                "if Path is relative, is one element long and has no index",
+                nodeType.canSetProperty(propDef.getName(), pathPathValue));
+
+        Value noPathPathValue = PathValue.valueOf("/abc");
+        assertFalse("canSetProperty(String propertyName, Value value) must return " +
+                "false if the property is of type Path and value is a PathValue " +
+                "if Path is not relative, is more than one element long or has an index",
+                nodeType.canSetProperty(propDef.getName(), noPathPathValue));
+    }
+
+    /**
+     * Tests if NodeType.canSetProperty(String propertyName, Value[] values)
+     * returns true if all values and its types are convertible to PathValue.
+     */
+    public void testConversionsMultiple()
+            throws NotExecutableException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.PATH, true, false, false, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple path property def that meets the " +
+                    "requirements of the test has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+
+        Value pathValue = NodeTypeUtil.getValueOfType(PropertyType.PATH);
+
+        Value pathStringValue = new StringValue("abc");
+        Value pathStringValues[] = {pathStringValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Path and values are of type StringValue " +
+                "that are convertible to PathValues",
+                nodeType.canSetProperty(propDef.getName(), pathStringValues));
+
+        Value notPathStringValue = new StringValue("a:b:c");
+        Value notPathStringValues[] = {pathValue, notPathStringValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Path and values are of type StringValue " +
+                "that are not convertible to PathValues ",
+                nodeType.canSetProperty(propDef.getName(), notPathStringValues));
+
+        Value pathBinaryValue = new BinaryValue("abc");
+        Value pathBinaryValues[] = {pathBinaryValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Path and values are of type BinaryValue " +
+                "that are convertible to PathValues",
+                nodeType.canSetProperty(propDef.getName(), pathBinaryValues));
+
+        Value notPathBinaryValue = new BinaryValue("a:b:c");
+        Value notPathBinaryValues[] = {pathValue, notPathBinaryValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Path and values are of type BinaryValue " +
+                "that are not convertible to PathValues",
+                nodeType.canSetProperty(propDef.getName(), notPathBinaryValues));
+
+        Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE);
+        Value dateValues[] = {pathValue, dateValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Path and values are of type DateValue",
+                nodeType.canSetProperty(propDef.getName(), dateValues));
+
+        Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE);
+        Value doubleValues[] = {pathValue, doubleValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Path and values are of type DoubleValue",
+                nodeType.canSetProperty(propDef.getName(), doubleValues));
+
+        Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG);
+        Value longValues[] = {pathValue, longValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Path and values are of type LongValue",
+                nodeType.canSetProperty(propDef.getName(), longValues));
+
+        Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN);
+        Value booleanValues[] = {booleanValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Path and values are of type BooleanValue",
+                nodeType.canSetProperty(propDef.getName(), booleanValues));
+
+        Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
+        Value nameValues[] = {nameValue};
+        assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+                "true if the property is of type Path and values are of type NameValue",
+                nodeType.canSetProperty(propDef.getName(), nameValues));
+
+        Value pathValues[] = {pathValue, pathValue};
+        assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+                "false if the property is of type Path and values are of type NameValue",
+                nodeType.canSetProperty(propDef.getName(), pathValues));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value value) returns false
+     * if value does not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraint()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.PATH, false, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No path property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No path property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+
+        assertFalse("canSetProperty(String propertyName, Value value) must " +
+                "return false if value does not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), value));
+    }
+
+    /**
+     * Tests if canSetProperty(String propertyName, Value[] values) returns
+     * false if values do not match the value constraints of the property def
+     */
+    public void testOutOfValueConstraintMultiple()
+            throws NotExecutableException, ParseException, RepositoryException {
+
+        PropertyDef propDef =
+                NodeTypeUtil.locatePropertyDef(session, PropertyType.PATH, true, false, true, false);
+
+        if (propDef == null) {
+            throw new NotExecutableException("No multiple path property def with " +
+                    "testable value constraints has been found");
+        }
+
+        Value value = NodeTypeUtil.getValueOutOfContstraint(propDef);
+        if (value == null) {
+            // value should never be null since this is catched already in locatePropertyDef
+            throw new NotExecutableException("No multiple path property def with " +
+                    "testable value constraints has been found");
+        }
+
+        NodeType nodeType = propDef.getDeclaringNodeType();
+        Value values[] = {value};
+
+        assertFalse("canSetProperty(String propertyName, Value[] values) must " +
+                "return false if values do not match the value constraints.",
+                nodeType.canSetProperty(propDef.getName(), values));
+    }
+}
\ No newline at end of file

Propchange: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message