You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by st...@apache.org on 2005/04/06 16:51:16 UTC
svn commit: r160300 -
incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyNameTest.java
incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java
Author: stefan
Date: Wed Apr 6 07:51:15 2005
New Revision: 160300
URL: http://svn.apache.org/viewcvs?view=rev&rev=160300
Log:
fixed incorrect assertions in testcases
Modified:
incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyNameTest.java
incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java
Modified: 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=diff&r1=160299&r2=160300
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyNameTest.java (original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyNameTest.java Wed Apr 6 07:51:15 2005
@@ -130,8 +130,8 @@
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",
+ assertTrue("canSetProperty(String propertyName, Value value) must return " +
+ "true if the property is of type Name and value is a NameValue",
nodeType.canSetProperty(propDef.getName(), nameValue));
Value namePathValue = PathValue.valueOf("abc");
@@ -215,13 +215,13 @@
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",
+ assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+ "false 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",
+ assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+ "true if the property is of type Name and values are of type NameValue",
nodeType.canSetProperty(propDef.getName(), nameValues));
Value namePathValue = PathValue.valueOf("abc");
Modified: 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=diff&r1=160299&r2=160300
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java (original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java Wed Apr 6 07:51:15 2005
@@ -130,21 +130,19 @@
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",
+ assertTrue("canSetProperty(String propertyName, Value value) must return " +
+ "true if the property is of type Path and value is a NameValue",
nodeType.canSetProperty(propDef.getName(), pathValue));
- Value pathPathValue = PathValue.valueOf("abc");
+ Value relPathValue = PathValue.valueOf("abc");
+ assertTrue("canSetProperty(String propertyName, Value value) must return " +
+ "true if the property is of type Path and value is a PathValue",
+ nodeType.canSetProperty(propDef.getName(), relPathValue));
+
+ Value absPathValue = 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));
+ "true if the property is of type Path and value is a PathValue",
+ nodeType.canSetProperty(propDef.getName(), absPathValue));
}
/**
@@ -215,8 +213,8 @@
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",
+ assertFalse("canSetProperty(String propertyName, Value[] values) must return " +
+ "false if the property is of type Path and values are of type BooleanValue",
nodeType.canSetProperty(propDef.getName(), booleanValues));
Value nameValue = NodeTypeUtil.getValueOfType(PropertyType.NAME);
@@ -226,8 +224,8 @@
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",
+ assertTrue("canSetProperty(String propertyName, Value[] values) must return " +
+ "true if the property is of type Path and values are of type PathValue",
nodeType.canSetProperty(propDef.getName(), pathValues));
}