Package org.apache.jackrabbit.test.api
Class SetPropertyValueTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.SetPropertyValueTest
-
- All Implemented Interfaces:
junit.framework.Test
public class SetPropertyValueTest extends AbstractJCRTest
SetPropertyValueTest
tests the methodsNode.setProperty(String, Value)
,Node.setProperty(String, Value[])
andNode.setProperty(String, Value[], int)
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.test.AbstractJCRTest
isReadOnly, jcrBaseVersion, jcrCopiedFrom, jcrCreated, jcrFrozenNode, jcrFrozenUuid, jcrIsCheckedOut, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixShareable, mixSimpleVersionable, mixTitle, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntActivity, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testNodeTypeTestRoot, testPath, testRoot, testRootNode, vf, workspaceName
-
-
Constructor Summary
Constructors Constructor Description SetPropertyValueTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
setUp()
protected void
tearDown()
void
testCompactValueArrayWithNulls()
Tests ifNode.setProperty(String, Value[])
correctly compacts the value array by removing all null valuesvoid
testModifyValueArrayPropertyParent()
Tests if modifying properties withNode.setProperty(String, Value[])
works withparentNode.save()
void
testModifyValueArrayPropertyParentWithPropertyType()
Tests if modifying properties withNode.setProperty(String, Value[], int)
works withparentNode.save()
void
testModifyValueArrayPropertySession()
Tests if modifying properties withNode.setProperty(String, Value[])
works withSession.save()
void
testModifyValueArrayPropertySessionWithPropertyType()
Tests if modifying properties withNode.setProperty(String, Value[], int)
works withSession.save()
void
testModifyValuePropertyParent()
Tests if modifying a property withNode.setProperty(String, Value)
works withparentNode.save()
void
testModifyValuePropertyParentWithPropertyType()
Tests if modifying a property withNode.setProperty(String, Value, int)
works withparentNode.save()
void
testModifyValuePropertySession()
Tests if modifying a property withNode.setProperty(String, Value)
works withSession.save()
void
testModifyValuePropertySessionWithPropertyType()
Tests if modifying a property withNode.setProperty(String, Value, int)
works withSession.save()
void
testNewValueArrayPropertyParent()
Tests if adding properties withNode.setProperty(String, Value[])
works withparentNode.save()
void
testNewValueArrayPropertyParentWithPropertyType()
Tests if adding properties withNode.setProperty(String, Value[], int)
works withparentNode.save()
void
testNewValueArrayPropertySession()
Tests if adding properties withNode.setProperty(String, Value[])
works withSession.save()
void
testNewValueArrayPropertySessionWithPropertyType()
Tests if adding properties withNode.setProperty(String, Value[], int)
works withSession.save()
void
testNewValuePropertyParent()
Tests if adding a property withNode.setProperty(String, Value)
works withparentNode.save()
void
testNewValuePropertyParentWithPropertyType()
Tests if adding a property withNode.setProperty(String, Value, int)
works withparentNode.save()
void
testNewValuePropertySession()
Tests if adding a property withNode.setProperty(String, Value)
works withSession.save()
void
testNewValuePropertySessionWithPropertyType()
Tests if adding a property withNode.setProperty(String, Value, int)
works withSession.save()
void
testRemoveValueArrayPropertyParent()
Tests if removing aValue[]
property withNode.setProperty(String, null)
works withparentNode.save()
void
testRemoveValueArrayPropertyParentWithPropertyType()
Tests if removing aValue[]
property withNode.setProperty(String, null, int)
works withparentNode.save()
void
testRemoveValueArrayPropertySession()
Tests if removing aValue[]
property withNode.setProperty(String, null)
works withSession.save()
void
testRemoveValueArrayPropertySessionWithPropertyType()
Tests if removing aValue[]
property withNode.setProperty(String, null, int)
works withSession.save()
void
testRemoveValuePropertyParent()
Tests if removing aValue
property withNode.setProperty(String, null)
works withparentNode.save()
void
testRemoveValuePropertyParentWithPropertyType()
Tests if removing aValue
property withNode.setProperty(String, null, int)
works withparentNode.save()
void
testRemoveValuePropertySession()
Tests if removing aValue
property withNode.setProperty(String, null)
works withSession.save()
void
testRemoveValuePropertySessionWithPropertyType()
Tests if removing aValue
property withNode.setProperty(String, null, int)
works withSession.save()
void
testSetMixedValueArrayValueFormatException()
Tests ifNode.setProperty(String, Value[])
throws aValueFormatException
when trying to set a multi-value property to an array of values with different typesvoid
testSetMixedValueArrayValueFormatExceptionWithPropertyType()
Tests ifNode.setProperty(String, Value[], int)
throws aValueFormatException
when trying to set a multi-value property to an array of values with different typesvoid
testSetNullValueArray()
Tests ifNode.setProperty(String, Value[])
saves an array of null values as an empty Value[]void
testSetNullValueArrayWithPropertyType()
Tests ifNode.setProperty(String, Value[], int)
saves an array of null values as an empty Value[]-
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, run
-
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, runBare, runTest, setName, toString
-
-
-
-
Method Detail
-
setUp
protected void setUp() throws Exception
- Overrides:
setUp
in classAbstractJCRTest
- Throws:
Exception
-
tearDown
protected void tearDown() throws Exception
- Overrides:
tearDown
in classAbstractJCRTest
- Throws:
Exception
-
testNewValuePropertySession
public void testNewValuePropertySession() throws Exception
Tests if adding a property withNode.setProperty(String, Value)
works withSession.save()
- Throws:
Exception
-
testModifyValuePropertySession
public void testModifyValuePropertySession() throws Exception
Tests if modifying a property withNode.setProperty(String, Value)
works withSession.save()
- Throws:
Exception
-
testNewValuePropertyParent
public void testNewValuePropertyParent() throws Exception
Tests if adding a property withNode.setProperty(String, Value)
works withparentNode.save()
- Throws:
Exception
-
testModifyValuePropertyParent
public void testModifyValuePropertyParent() throws Exception
Tests if modifying a property withNode.setProperty(String, Value)
works withparentNode.save()
- Throws:
Exception
-
testRemoveValuePropertySession
public void testRemoveValuePropertySession() throws Exception
Tests if removing aValue
property withNode.setProperty(String, null)
works withSession.save()
- Throws:
Exception
-
testRemoveValuePropertyParent
public void testRemoveValuePropertyParent() throws Exception
Tests if removing aValue
property withNode.setProperty(String, null)
works withparentNode.save()
- Throws:
Exception
-
testNewValuePropertySessionWithPropertyType
public void testNewValuePropertySessionWithPropertyType() throws Exception
Tests if adding a property withNode.setProperty(String, Value, int)
works withSession.save()
- Throws:
Exception
-
testModifyValuePropertySessionWithPropertyType
public void testModifyValuePropertySessionWithPropertyType() throws Exception
Tests if modifying a property withNode.setProperty(String, Value, int)
works withSession.save()
- Throws:
Exception
-
testNewValuePropertyParentWithPropertyType
public void testNewValuePropertyParentWithPropertyType() throws Exception
Tests if adding a property withNode.setProperty(String, Value, int)
works withparentNode.save()
- Throws:
Exception
-
testModifyValuePropertyParentWithPropertyType
public void testModifyValuePropertyParentWithPropertyType() throws Exception
Tests if modifying a property withNode.setProperty(String, Value, int)
works withparentNode.save()
- Throws:
Exception
-
testRemoveValuePropertySessionWithPropertyType
public void testRemoveValuePropertySessionWithPropertyType() throws Exception
Tests if removing aValue
property withNode.setProperty(String, null, int)
works withSession.save()
- Throws:
Exception
-
testRemoveValuePropertyParentWithPropertyType
public void testRemoveValuePropertyParentWithPropertyType() throws Exception
Tests if removing aValue
property withNode.setProperty(String, null, int)
works withparentNode.save()
- Throws:
Exception
-
testNewValueArrayPropertySession
public void testNewValueArrayPropertySession() throws Exception
Tests if adding properties withNode.setProperty(String, Value[])
works withSession.save()
- Throws:
Exception
-
testModifyValueArrayPropertySession
public void testModifyValueArrayPropertySession() throws Exception
Tests if modifying properties withNode.setProperty(String, Value[])
works withSession.save()
- Throws:
Exception
-
testNewValueArrayPropertyParent
public void testNewValueArrayPropertyParent() throws Exception
Tests if adding properties withNode.setProperty(String, Value[])
works withparentNode.save()
- Throws:
Exception
-
testModifyValueArrayPropertyParent
public void testModifyValueArrayPropertyParent() throws Exception
Tests if modifying properties withNode.setProperty(String, Value[])
works withparentNode.save()
- Throws:
Exception
-
testSetMixedValueArrayValueFormatException
public void testSetMixedValueArrayValueFormatException() throws Exception
Tests ifNode.setProperty(String, Value[])
throws aValueFormatException
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 aValue[]
property withNode.setProperty(String, null)
works withSession.save()
- Throws:
Exception
-
testRemoveValueArrayPropertyParent
public void testRemoveValueArrayPropertyParent() throws Exception
Tests if removing aValue[]
property withNode.setProperty(String, null)
works withparentNode.save()
- Throws:
Exception
-
testSetNullValueArray
public void testSetNullValueArray() throws Exception
Tests ifNode.setProperty(String, Value[])
saves an array of null values as an empty Value[]- Throws:
Exception
-
testCompactValueArrayWithNulls
public void testCompactValueArrayWithNulls() throws Exception
Tests ifNode.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 withNode.setProperty(String, Value[], int)
works withSession.save()
- Throws:
Exception
-
testModifyValueArrayPropertySessionWithPropertyType
public void testModifyValueArrayPropertySessionWithPropertyType() throws Exception
Tests if modifying properties withNode.setProperty(String, Value[], int)
works withSession.save()
- Throws:
Exception
-
testNewValueArrayPropertyParentWithPropertyType
public void testNewValueArrayPropertyParentWithPropertyType() throws Exception
Tests if adding properties withNode.setProperty(String, Value[], int)
works withparentNode.save()
- Throws:
Exception
-
testModifyValueArrayPropertyParentWithPropertyType
public void testModifyValueArrayPropertyParentWithPropertyType() throws Exception
Tests if modifying properties withNode.setProperty(String, Value[], int)
works withparentNode.save()
- Throws:
Exception
-
testSetMixedValueArrayValueFormatExceptionWithPropertyType
public void testSetMixedValueArrayValueFormatExceptionWithPropertyType() throws Exception
Tests ifNode.setProperty(String, Value[], int)
throws aValueFormatException
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 aValue[]
property withNode.setProperty(String, null, int)
works withSession.save()
- Throws:
Exception
-
testRemoveValueArrayPropertyParentWithPropertyType
public void testRemoveValueArrayPropertyParentWithPropertyType() throws Exception
Tests if removing aValue[]
property withNode.setProperty(String, null, int)
works withparentNode.save()
- Throws:
Exception
-
-