public class SetPropertyAssumeTypeTest extends AbstractJCRTest
SetPropertyAssumeTypeTest tests if when setting a property
of type PropertyType.UNDEFINED the type is assumed correctly.
The signatures Node.setProperty(String, Value, int),
Node.setProperty(String, String, int),
Node.setProperty(String, Value[], int) and
Node.setProperty(String, Node) are tested.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, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testNodeTypeTestRoot, testPath, testRoot, testRootNode, vf, workspaceName| Constructor and Description |
|---|
SetPropertyAssumeTypeTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
setUp() |
protected void |
tearDown() |
void |
testNodeAssumeTypeOfValue()
Tests if
Node.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. |
void |
testString()
Tests if
Node.setProperty(String, String, int) if the node
type of this node does not indicate a specific property type, then the
type parameter is used. |
void |
testStringConstraintViolationExceptionBecauseOfInvalidTypeParameter()
Tests if
Node.setProperty(String, String, int) throws a
ConstraintViolationException if the type parameter and the type of the
property do not match. |
void |
testValue()
Tests if
Node.setProperty(String, Value, int) if the node
type of this node does not indicate a specific property type, then the
type parameter is used. |
void |
testValueAssumeTypeOfValue()
Tests if
Node.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. |
void |
testValueConstraintViolationExceptionBecauseOfInvalidTypeParameter()
Tests if
Node.setProperty(String, Value, int) throws a
ConstraintViolationException if the type parameter and the type of the
property do not match. |
void |
testValues()
Tests if
Node.setProperty(String, Value[], int) if the node
type of this node does not indicate a specific property type, then the
type parameter is used. |
void |
testValuesAssumeTypeOfValue()
Tests if
Node.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. |
void |
testValuesConstraintViolationExceptionBecauseOfInvalidTypeParameter()
Tests if
Node.setProperty(String, Value[], int) throws a
ConstraintViolationException or ValueFormatException if the type
parameter and the type of the property do not match. |
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, runassertEquals, 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, toStringpublic void setUp()
throws Exception
setUp in class AbstractJCRTestExceptionprotected void tearDown()
throws Exception
tearDown in class AbstractJCRTestExceptionpublic void testValue()
throws NotExecutableException,
javax.jcr.RepositoryException
Node.setProperty(String, Value, int) if the node
type of this node does not indicate a specific property type, then the
type parameter is used.NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testValues()
throws NotExecutableException,
javax.jcr.RepositoryException
Node.setProperty(String, Value[], int) if the node
type of this node does not indicate a specific property type, then the
type parameter is used.NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testString()
throws NotExecutableException,
javax.jcr.RepositoryException
Node.setProperty(String, String, int) if the node
type of this node does not indicate a specific property type, then the
type parameter is used.NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testValueAssumeTypeOfValue()
throws NotExecutableException,
javax.jcr.RepositoryException
Node.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.NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testNodeAssumeTypeOfValue()
throws NotExecutableException,
javax.jcr.RepositoryException
Node.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.NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testValuesAssumeTypeOfValue()
throws NotExecutableException,
javax.jcr.RepositoryException
Node.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.NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testValueConstraintViolationExceptionBecauseOfInvalidTypeParameter()
throws NotExecutableException,
javax.jcr.RepositoryException
Node.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.NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testStringConstraintViolationExceptionBecauseOfInvalidTypeParameter()
throws NotExecutableException,
javax.jcr.RepositoryException
Node.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.NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testValuesConstraintViolationExceptionBecauseOfInvalidTypeParameter()
throws NotExecutableException,
javax.jcr.RepositoryException
Node.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.NotExecutableExceptionjavax.jcr.RepositoryExceptionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.