Package org.apache.jackrabbit.test.api
Class SetPropertyAssumeTypeTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.SetPropertyAssumeTypeTest
-
- All Implemented Interfaces:
junit.framework.Test
public class SetPropertyAssumeTypeTest extends AbstractJCRTest
SetPropertyAssumeTypeTesttests if when setting a property of typePropertyType.UNDEFINEDthe type is assumed correctly. The signaturesNode.setProperty(String, Value, int),Node.setProperty(String, String, int),Node.setProperty(String, Value[], int)andNode.setProperty(String, Node)are tested.
-
-
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 SetPropertyAssumeTypeTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()protected voidtearDown()voidtestNodeAssumeTypeOfValue()Tests ifNode.setProperty(String, Node)if the node type of this node does not indicate a specific property type, then the property type of the supplied Value object is used and if the property already exists (has previously been set) it assumes the new property type.voidtestString()Tests ifNode.setProperty(String, String, int)if the node type of this node does not indicate a specific property type, then the type parameter is used.voidtestStringConstraintViolationExceptionBecauseOfInvalidTypeParameter()Tests ifNode.setProperty(String, String, int)throws a ConstraintViolationException if the type parameter and the type of the property do not match.voidtestValue()Tests ifNode.setProperty(String, Value, int)if the node type of this node does not indicate a specific property type, then the type parameter is used.voidtestValueAssumeTypeOfValue()Tests ifNode.setProperty(String, Value)if the node type of this node does not indicate a specific property type, then the property type of the supplied Value object is used and if the property already exists (has previously been set) it assumes the new property type.voidtestValueConstraintViolationExceptionBecauseOfInvalidTypeParameter()Tests ifNode.setProperty(String, Value, int)throws a ConstraintViolationException if the type parameter and the type of the property do not match.voidtestValues()Tests ifNode.setProperty(String, Value[], int)if the node type of this node does not indicate a specific property type, then the type parameter is used.voidtestValuesAssumeTypeOfValue()Tests ifNode.setProperty(String, Value[])if the node type of this node does not indicate a specific property type, then the property type of the supplied Value object is used and if the property already exists (has previously been set) it assumes the new property type.voidtestValuesConstraintViolationExceptionBecauseOfInvalidTypeParameter()Tests ifNode.setProperty(String, Value[], int)throws a ConstraintViolationException or ValueFormatException if the type parameter and the type of the property do not match.-
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
public void setUp() throws Exception- Overrides:
setUpin classAbstractJCRTest- Throws:
Exception
-
tearDown
protected void tearDown() throws Exception- Overrides:
tearDownin classAbstractJCRTest- Throws:
Exception
-
testValue
public void testValue() throws NotExecutableException, RepositoryExceptionTests ifNode.setProperty(String, Value, int)if the node type of this node does not indicate a specific property type, then the type parameter is used.
-
testValues
public void testValues() throws NotExecutableException, RepositoryExceptionTests ifNode.setProperty(String, Value[], int)if the node type of this node does not indicate a specific property type, then the type parameter is used.
-
testString
public void testString() throws NotExecutableException, RepositoryExceptionTests ifNode.setProperty(String, String, int)if the node type of this node does not indicate a specific property type, then the type parameter is used.
-
testValueAssumeTypeOfValue
public void testValueAssumeTypeOfValue() throws NotExecutableException, RepositoryExceptionTests ifNode.setProperty(String, Value)if the node type of this node does not indicate a specific property type, then the property type of the supplied Value object is used and if the property already exists (has previously been set) it assumes the new property type.
-
testNodeAssumeTypeOfValue
public void testNodeAssumeTypeOfValue() throws NotExecutableException, RepositoryExceptionTests ifNode.setProperty(String, Node)if the node type of this node does not indicate a specific property type, then the property type of the supplied Value object is used and if the property already exists (has previously been set) it assumes the new property type.
-
testValuesAssumeTypeOfValue
public void testValuesAssumeTypeOfValue() throws NotExecutableException, RepositoryExceptionTests ifNode.setProperty(String, Value[])if the node type of this node does not indicate a specific property type, then the property type of the supplied Value object is used and if the property already exists (has previously been set) it assumes the new property type.
-
testValueConstraintViolationExceptionBecauseOfInvalidTypeParameter
public void testValueConstraintViolationExceptionBecauseOfInvalidTypeParameter() throws NotExecutableException, RepositoryExceptionTests ifNode.setProperty(String, Value, int)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.
-
testStringConstraintViolationExceptionBecauseOfInvalidTypeParameter
public void testStringConstraintViolationExceptionBecauseOfInvalidTypeParameter() throws NotExecutableException, RepositoryExceptionTests ifNode.setProperty(String, String, int)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.
-
testValuesConstraintViolationExceptionBecauseOfInvalidTypeParameter
public void testValuesConstraintViolationExceptionBecauseOfInvalidTypeParameter() throws NotExecutableException, RepositoryExceptionTests ifNode.setProperty(String, Value[], int)throws a 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.
-
-