Class StringPropertyTest

  • All Implemented Interfaces:
    junit.framework.Test

    public class StringPropertyTest
    extends AbstractJCRTest
    StringPropertyTest tests a String property against the conversions to other Properties (except Name and Path property). If no String property is found or only a multivalue String property with an empty array, a NotExecutableException is thrown on setUp. More precisely, the tests are:

    - Value.getString() should return a string equals to Property.getString(), and in case of a multivalue property the failure of Property.getString() is checked.

    - Value.getBoolean() Conversion to Boolean property.

    - Value.getDate() Conversion to Date property is only valid when the String follows the required Date pattern (6.2.5.1 of jsr170 specification).

    - Value.getDouble() Conversion to Double are only valid when the String follows the correct patterns as required by the according Java classes.

    - Value.getLong() Conversion to Double are only valid when the String follows the correct patterns as required by the according Java classes.

    - Value.getStream() Conversion to a Binary property follows the rules of Value.getStream() as explained in chapter 6.2.7 of the jsr170 specification. The required encoding is utf-8.

    - Property.getNode() Conversion to a Reference property is tested with Property.getNode. The String should match the UUID pattern but this doesn't guarantee to be a reference (which especially requires integrity).

    - Property.getLength() .

    - Property.getLengths() .

    - Property.getType() is compared to Value.getType() .