You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by mr...@apache.org on 2006/07/27 09:49:33 UTC
svn commit: r425993 -
/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java
Author: mreutegg
Date: Thu Jul 27 00:49:33 2006
New Revision: 425993
URL: http://svn.apache.org/viewvc?rev=425993&view=rev
Log:
JCR-492: TCK: PropertyReadMethodsTest#testGetValues fails if it cannot find a single valued STRING property
Modified:
jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java
Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java?rev=425993&r1=425992&r2=425993&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java (original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java Thu Jul 27 00:49:33 2006
@@ -267,8 +267,13 @@
* Tests failure of Property.getValues() method for a single value
* property.
*/
- public void testGetValues() throws RepositoryException {
+ public void testGetValues() throws RepositoryException, NotExecutableException {
Property singleProp = PropertyUtil.searchProp(session, testRootNode, PropertyType.STRING);
+
+ if (singleProp == null) {
+ throw new NotExecutableException("No single valued String property found.");
+ }
+
try {
singleProp.getValues();
fail("Property.getValues() called on a single property " +
@@ -287,13 +292,13 @@
Property prop = PropertyUtil.searchMultivalProp(testRootNode, PropertyType.STRING);
if (prop == null) {
- throw new NotExecutableException("No testable propery found.");
+ throw new NotExecutableException("No testable property found.");
}
// acquire the values of the property and change the zeroth value
Value[] values = prop.getValues();
if (values.length == 0) {
- throw new NotExecutableException("No testable propery found.");
+ throw new NotExecutableException("No testable property found.");
}
values[0] = null;