jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r428051 - /jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyAssumeTypeTest.java
Date Wed, 02 Aug 2006 16:56:21 GMT
Author: mreutegg
Date: Wed Aug  2 09:56:21 2006
New Revision: 428051

URL: http://svn.apache.org/viewvc?rev=428051&view=rev
Log:
JCR-513: TCK: SetPropertyAssumeTypeTest doesn't allow ValueFormatException upon type conversion
failure

Modified:
    jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyAssumeTypeTest.java

Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyAssumeTypeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyAssumeTypeTest.java?rev=428051&r1=428050&r2=428051&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyAssumeTypeTest.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/SetPropertyAssumeTypeTest.java
Wed Aug  2 09:56:21 2006
@@ -28,6 +28,7 @@
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 import javax.jcr.Property;
+import javax.jcr.ValueFormatException;
 import java.util.Calendar;
 import java.util.Date;
 
@@ -495,9 +496,9 @@
 
     /**
      * Tests if <code>Node.setProperty(String, Value[], int)</code> throws a
-     * ConstraintViolationException if the type parameter and the type of the
-     * property do not match. The exception has to be thrown either immediately
-     * (by this method) or on save.
+     * ConstraintViolationException or ValueFormatException if the type
+     * parameter and the type of the property do not match. The exception has to
+     * be thrown either immediately (by this method) or on save.
      */
     public void testValuesConstraintVioloationExceptionBecauseOfInvalidTypeParameter()
         throws NotExecutableException, RepositoryException {
@@ -519,10 +520,11 @@
             testNode.setProperty(testPropName, stringValues, PropertyType.DATE);
             testRootNode.save();
             fail("Node.setProperty(String, Value, int) must throw a " +
-                 "ConstraintViolationExcpetion if the type parameter and the " +
-                 "type of the property do not match." );
-        }
-        catch (ConstraintViolationException e) {
+                    "ConstraintViolationExcpetion or a ValueFormatException if " +
+                    "the type parameter and the type of the property do not match.");
+        } catch (ConstraintViolationException e) {
+            // success
+        } catch (ValueFormatException e) {
             // success
         }
     }



Mime
View raw message