Class SetPropertyValueTest

  • All Implemented Interfaces:
    junit.framework.Test

    public class SetPropertyValueTest
    extends AbstractJCRTest
    SetPropertyValueTest tests the methods Node.setProperty(String, Value), Node.setProperty(String, Value[]) and Node.setProperty(String, Value[], int)
    • Constructor Detail

      • SetPropertyValueTest

        public SetPropertyValueTest()
    • Method Detail

      • testNewValuePropertySession

        public void testNewValuePropertySession()
                                         throws Exception
        Tests if adding a property with Node.setProperty(String, Value) works with Session.save()
        Throws:
        Exception
      • testModifyValuePropertySession

        public void testModifyValuePropertySession()
                                            throws Exception
        Tests if modifying a property with Node.setProperty(String, Value) works with Session.save()
        Throws:
        Exception
      • testNewValuePropertyParent

        public void testNewValuePropertyParent()
                                        throws Exception
        Tests if adding a property with Node.setProperty(String, Value) works with parentNode.save()
        Throws:
        Exception
      • testModifyValuePropertyParent

        public void testModifyValuePropertyParent()
                                           throws Exception
        Tests if modifying a property with Node.setProperty(String, Value) works with parentNode.save()
        Throws:
        Exception
      • testRemoveValuePropertySession

        public void testRemoveValuePropertySession()
                                            throws Exception
        Tests if removing a Value property with Node.setProperty(String, null) works with Session.save()
        Throws:
        Exception
      • testRemoveValuePropertyParent

        public void testRemoveValuePropertyParent()
                                           throws Exception
        Tests if removing a Value property with Node.setProperty(String, null) works with parentNode.save()
        Throws:
        Exception
      • testNewValuePropertySessionWithPropertyType

        public void testNewValuePropertySessionWithPropertyType()
                                                         throws Exception
        Tests if adding a property with Node.setProperty(String, Value, int) works with Session.save()
        Throws:
        Exception
      • testModifyValuePropertySessionWithPropertyType

        public void testModifyValuePropertySessionWithPropertyType()
                                                            throws Exception
        Tests if modifying a property with Node.setProperty(String, Value, int) works with Session.save()
        Throws:
        Exception
      • testNewValuePropertyParentWithPropertyType

        public void testNewValuePropertyParentWithPropertyType()
                                                        throws Exception
        Tests if adding a property with Node.setProperty(String, Value, int) works with parentNode.save()
        Throws:
        Exception
      • testModifyValuePropertyParentWithPropertyType

        public void testModifyValuePropertyParentWithPropertyType()
                                                           throws Exception
        Tests if modifying a property with Node.setProperty(String, Value, int) works with parentNode.save()
        Throws:
        Exception
      • testRemoveValuePropertySessionWithPropertyType

        public void testRemoveValuePropertySessionWithPropertyType()
                                                            throws Exception
        Tests if removing a Value property with Node.setProperty(String, null, int) works with Session.save()
        Throws:
        Exception
      • testRemoveValuePropertyParentWithPropertyType

        public void testRemoveValuePropertyParentWithPropertyType()
                                                           throws Exception
        Tests if removing a Value property with Node.setProperty(String, null, int) works with parentNode.save()
        Throws:
        Exception
      • testNewValueArrayPropertySession

        public void testNewValueArrayPropertySession()
                                              throws Exception
        Tests if adding properties with Node.setProperty(String, Value[]) works with Session.save()
        Throws:
        Exception
      • testModifyValueArrayPropertySession

        public void testModifyValueArrayPropertySession()
                                                 throws Exception
        Tests if modifying properties with Node.setProperty(String, Value[]) works with Session.save()
        Throws:
        Exception
      • testNewValueArrayPropertyParent

        public void testNewValueArrayPropertyParent()
                                             throws Exception
        Tests if adding properties with Node.setProperty(String, Value[]) works with parentNode.save()
        Throws:
        Exception
      • testModifyValueArrayPropertyParent

        public void testModifyValueArrayPropertyParent()
                                                throws Exception
        Tests if modifying properties with Node.setProperty(String, Value[]) works with parentNode.save()
        Throws:
        Exception
      • testSetMixedValueArrayValueFormatException

        public void testSetMixedValueArrayValueFormatException()
                                                        throws Exception
        Tests if Node.setProperty(String, Value[]) throws a ValueFormatException when trying to set a multi-value property to an array of values with different types
        Throws:
        Exception
      • testRemoveValueArrayPropertySession

        public void testRemoveValueArrayPropertySession()
                                                 throws Exception
        Tests if removing a Value[] property with Node.setProperty(String, null) works with Session.save()
        Throws:
        Exception
      • testRemoveValueArrayPropertyParent

        public void testRemoveValueArrayPropertyParent()
                                                throws Exception
        Tests if removing a Value[] property with Node.setProperty(String, null) works with parentNode.save()
        Throws:
        Exception
      • testSetNullValueArray

        public void testSetNullValueArray()
                                   throws Exception
        Tests if Node.setProperty(String, Value[]) saves an array of null values as an empty Value[]
        Throws:
        Exception
      • testCompactValueArrayWithNulls

        public void testCompactValueArrayWithNulls()
                                            throws Exception
        Tests if Node.setProperty(String, Value[]) correctly compacts the value array by removing all null values
        Throws:
        Exception
      • testNewValueArrayPropertySessionWithPropertyType

        public void testNewValueArrayPropertySessionWithPropertyType()
                                                              throws Exception
        Tests if adding properties with Node.setProperty(String, Value[], int) works with Session.save()
        Throws:
        Exception
      • testModifyValueArrayPropertySessionWithPropertyType

        public void testModifyValueArrayPropertySessionWithPropertyType()
                                                                 throws Exception
        Tests if modifying properties with Node.setProperty(String, Value[], int) works with Session.save()
        Throws:
        Exception
      • testNewValueArrayPropertyParentWithPropertyType

        public void testNewValueArrayPropertyParentWithPropertyType()
                                                             throws Exception
        Tests if adding properties with Node.setProperty(String, Value[], int) works with parentNode.save()
        Throws:
        Exception
      • testModifyValueArrayPropertyParentWithPropertyType

        public void testModifyValueArrayPropertyParentWithPropertyType()
                                                                throws Exception
        Tests if modifying properties with Node.setProperty(String, Value[], int) works with parentNode.save()
        Throws:
        Exception
      • testSetMixedValueArrayValueFormatExceptionWithPropertyType

        public void testSetMixedValueArrayValueFormatExceptionWithPropertyType()
                                                                        throws Exception
        Tests if Node.setProperty(String, Value[], int) throws a ValueFormatException when trying to set a multi-value property to an array of values with different types
        Throws:
        Exception
      • testRemoveValueArrayPropertySessionWithPropertyType

        public void testRemoveValueArrayPropertySessionWithPropertyType()
                                                                 throws Exception
        Tests if removing a Value[] property with Node.setProperty(String, null, int) works with Session.save()
        Throws:
        Exception
      • testRemoveValueArrayPropertyParentWithPropertyType

        public void testRemoveValueArrayPropertyParentWithPropertyType()
                                                                throws Exception
        Tests if removing a Value[] property with Node.setProperty(String, null, int) works with parentNode.save()
        Throws:
        Exception
      • testSetNullValueArrayWithPropertyType

        public void testSetNullValueArrayWithPropertyType()
                                                   throws Exception
        Tests if Node.setProperty(String, Value[], int) saves an array of null values as an empty Value[]
        Throws:
        Exception