org.apache.jackrabbit.test.api
Class SetPropertyValueTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.jackrabbit.test.JUnitTest
              extended byorg.apache.jackrabbit.test.AbstractJCRTest
                  extended byorg.apache.jackrabbit.test.api.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)


Field Summary
 
Fields inherited from class org.apache.jackrabbit.test.AbstractJCRTest
helper, isReadOnly, jcrBaseVersion, jcrCreated, jcrFrozenNode, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntBase, ntFrozenNode, ntQuery, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testPath, testRoot, testRootNode, workspaceName
 
Fields inherited from class org.apache.jackrabbit.test.JUnitTest
log
 
Constructor Summary
SetPropertyValueTest()
           
 
Method Summary
protected  void setUp()
           
 void testCompactValueArrayWithNulls()
          Tests if Node.setProperty(String, Value[]) correctly compacts the value array by removing all null values
 void testModifyValueArrayPropertyParent()
          Tests if modifying properties with Node.setProperty(String, Value[]) works with parentNode.save()
 void testModifyValueArrayPropertyParentWithPropertyType()
          Tests if modifying properties with Node.setProperty(String, Value[], int) works with parentNode.save()
 void testModifyValueArrayPropertySession()
          Tests if modifying properties with Node.setProperty(String, Value[]) works with Session.save()
 void testModifyValueArrayPropertySessionWithPropertyType()
          Tests if modifying properties with Node.setProperty(String, Value[], int) works with Session.save()
 void testModifyValuePropertyParent()
          Tests if modifying a property with Node.setProperty(String, Value) works with parentNode.save()
 void testModifyValuePropertyParentWithPropertyType()
          Tests if modifying a property with Node.setProperty(String, Value, int) works with parentNode.save()
 void testModifyValuePropertySession()
          Tests if modifying a property with Node.setProperty(String, Value) works with Session.save()
 void testModifyValuePropertySessionWithPropertyType()
          Tests if modifying a property with Node.setProperty(String, Value, int) works with Session.save()
 void testNewValueArrayPropertyParent()
          Tests if adding properties with Node.setProperty(String, Value[]) works with parentNode.save()
 void testNewValueArrayPropertyParentWithPropertyType()
          Tests if adding properties with Node.setProperty(String, Value[], int) works with parentNode.save()
 void testNewValueArrayPropertySession()
          Tests if adding properties with Node.setProperty(String, Value[]) works with Session.save()
 void testNewValueArrayPropertySessionWithPropertyType()
          Tests if adding properties with Node.setProperty(String, Value[], int) works with Session.save()
 void testNewValuePropertyParent()
          Tests if adding a property with Node.setProperty(String, Value) works with parentNode.save()
 void testNewValuePropertyParentWithPropertyType()
          Tests if adding a property with Node.setProperty(String, Value, int) works with parentNode.save()
 void testNewValuePropertySession()
          Tests if adding a property with Node.setProperty(String, Value) works with Session.save()
 void testNewValuePropertySessionWithPropertyType()
          Tests if adding a property with Node.setProperty(String, Value, int) works with Session.save()
 void testRemoveValueArrayPropertyParent()
          Tests if removing a Value[] property with Node.setProperty(String, null) works with parentNode.save()
 void testRemoveValueArrayPropertyParentWithPropertyType()
          Tests if removing a Value[] property with Node.setProperty(String, null, int) works with parentNode.save()
 void testRemoveValueArrayPropertySession()
          Tests if removing a Value[] property with Node.setProperty(String, null) works with Session.save()
 void testRemoveValueArrayPropertySessionWithPropertyType()
          Tests if removing a Value[] property with Node.setProperty(String, null, int) works with Session.save()
 void testRemoveValuePropertyParent()
          Tests if removing a Value property with Node.setProperty(String, null) works with parentNode.save()
 void testRemoveValuePropertyParentWithPropertyType()
          Tests if removing a Value property with Node.setProperty(String, null, int) works with parentNode.save()
 void testRemoveValuePropertySession()
          Tests if removing a Value property with Node.setProperty(String, null) works with Session.save()
 void testRemoveValuePropertySessionWithPropertyType()
          Tests if removing a Value property with Node.setProperty(String, null, int) works with Session.save()
 void testSetMixedValueArrayValueFormatException()
          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
 void testSetMixedValueArrayValueFormatExceptionWithPropertyType()
          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
 void testSetNullValueArray()
          Tests if Node.setProperty(String, Value[]) saves an array of null values as an empty Value[]
 void testSetNullValueArrayWithPropertyType()
          Tests if Node.setProperty(String, Value[], int) saves an array of null values as an empty Value[]
 void testSetSingleValueArrayValueFormatException()
          Tests if Node.setProperty(String, Value[]) throws a ValueFormatException when trying to set an existing single-valued property to a multi-value
 void testSetSingleValueArrayValueFormatExceptionWithPropertyType()
          Tests if Node.setProperty(String, Value[], int) throws a ValueFormatException when trying to set an existing single-valued property to a multi-value
 
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest
createRandomString, getNonExistingWorkspaceName, getProperty, getSize, run, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetPropertyValueTest

public SetPropertyValueTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class AbstractJCRTest
Throws:
java.lang.Exception

testNewValuePropertySession

public void testNewValuePropertySession()
                                 throws java.lang.Exception
Tests if adding a property with Node.setProperty(String, Value) works with Session.save()

Throws:
java.lang.Exception

testModifyValuePropertySession

public void testModifyValuePropertySession()
                                    throws java.lang.Exception
Tests if modifying a property with Node.setProperty(String, Value) works with Session.save()

Throws:
java.lang.Exception

testNewValuePropertyParent

public void testNewValuePropertyParent()
                                throws java.lang.Exception
Tests if adding a property with Node.setProperty(String, Value) works with parentNode.save()

Throws:
java.lang.Exception

testModifyValuePropertyParent

public void testModifyValuePropertyParent()
                                   throws java.lang.Exception
Tests if modifying a property with Node.setProperty(String, Value) works with parentNode.save()

Throws:
java.lang.Exception

testRemoveValuePropertySession

public void testRemoveValuePropertySession()
                                    throws java.lang.Exception
Tests if removing a Value property with Node.setProperty(String, null) works with Session.save()

Throws:
java.lang.Exception

testRemoveValuePropertyParent

public void testRemoveValuePropertyParent()
                                   throws java.lang.Exception
Tests if removing a Value property with Node.setProperty(String, null) works with parentNode.save()

Throws:
java.lang.Exception

testNewValuePropertySessionWithPropertyType

public void testNewValuePropertySessionWithPropertyType()
                                                 throws java.lang.Exception
Tests if adding a property with Node.setProperty(String, Value, int) works with Session.save()

Throws:
java.lang.Exception

testModifyValuePropertySessionWithPropertyType

public void testModifyValuePropertySessionWithPropertyType()
                                                    throws java.lang.Exception
Tests if modifying a property with Node.setProperty(String, Value, int) works with Session.save()

Throws:
java.lang.Exception

testNewValuePropertyParentWithPropertyType

public void testNewValuePropertyParentWithPropertyType()
                                                throws java.lang.Exception
Tests if adding a property with Node.setProperty(String, Value, int) works with parentNode.save()

Throws:
java.lang.Exception

testModifyValuePropertyParentWithPropertyType

public void testModifyValuePropertyParentWithPropertyType()
                                                   throws java.lang.Exception
Tests if modifying a property with Node.setProperty(String, Value, int) works with parentNode.save()

Throws:
java.lang.Exception

testRemoveValuePropertySessionWithPropertyType

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

Throws:
java.lang.Exception

testRemoveValuePropertyParentWithPropertyType

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

Throws:
java.lang.Exception

testNewValueArrayPropertySession

public void testNewValueArrayPropertySession()
                                      throws java.lang.Exception
Tests if adding properties with Node.setProperty(String, Value[]) works with Session.save()

Throws:
java.lang.Exception

testModifyValueArrayPropertySession

public void testModifyValueArrayPropertySession()
                                         throws java.lang.Exception
Tests if modifying properties with Node.setProperty(String, Value[]) works with Session.save()

Throws:
java.lang.Exception

testNewValueArrayPropertyParent

public void testNewValueArrayPropertyParent()
                                     throws java.lang.Exception
Tests if adding properties with Node.setProperty(String, Value[]) works with parentNode.save()

Throws:
java.lang.Exception

testModifyValueArrayPropertyParent

public void testModifyValueArrayPropertyParent()
                                        throws java.lang.Exception
Tests if modifying properties with Node.setProperty(String, Value[]) works with parentNode.save()

Throws:
java.lang.Exception

testSetMixedValueArrayValueFormatException

public void testSetMixedValueArrayValueFormatException()
                                                throws java.lang.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:
java.lang.Exception

testSetSingleValueArrayValueFormatException

public void testSetSingleValueArrayValueFormatException()
                                                 throws java.lang.Exception
Tests if Node.setProperty(String, Value[]) throws a ValueFormatException when trying to set an existing single-valued property to a multi-value

Throws:
java.lang.Exception

testRemoveValueArrayPropertySession

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

Throws:
java.lang.Exception

testRemoveValueArrayPropertyParent

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

Throws:
java.lang.Exception

testSetNullValueArray

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

Throws:
java.lang.Exception

testCompactValueArrayWithNulls

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

Throws:
java.lang.Exception

testNewValueArrayPropertySessionWithPropertyType

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

Throws:
java.lang.Exception

testModifyValueArrayPropertySessionWithPropertyType

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

Throws:
java.lang.Exception

testNewValueArrayPropertyParentWithPropertyType

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

Throws:
java.lang.Exception

testModifyValueArrayPropertyParentWithPropertyType

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

Throws:
java.lang.Exception

testSetMixedValueArrayValueFormatExceptionWithPropertyType

public void testSetMixedValueArrayValueFormatExceptionWithPropertyType()
                                                                throws java.lang.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:
java.lang.Exception

testSetSingleValueArrayValueFormatExceptionWithPropertyType

public void testSetSingleValueArrayValueFormatExceptionWithPropertyType()
                                                                 throws java.lang.Exception
Tests if Node.setProperty(String, Value[], int) throws a ValueFormatException when trying to set an existing single-valued property to a multi-value

Throws:
java.lang.Exception

testRemoveValueArrayPropertySessionWithPropertyType

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

Throws:
java.lang.Exception

testRemoveValueArrayPropertyParentWithPropertyType

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

Throws:
java.lang.Exception

testSetNullValueArrayWithPropertyType

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

Throws:
java.lang.Exception


Copyright © -2005 . All Rights Reserved.