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, ntActivity, 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, run
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
public void setUp() throws Exception
setUp
in class AbstractJCRTest
Exception
protected void tearDown() throws Exception
tearDown
in class AbstractJCRTest
Exception
public void testValue() throws NotExecutableException, 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.public void testValues() throws NotExecutableException, 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.public void testString() throws NotExecutableException, 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.public void testValueAssumeTypeOfValue() throws NotExecutableException, 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.public void testNodeAssumeTypeOfValue() throws NotExecutableException, 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.public void testValuesAssumeTypeOfValue() throws NotExecutableException, 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.public void testValueConstraintViolationExceptionBecauseOfInvalidTypeParameter() throws NotExecutableException, 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.public void testStringConstraintViolationExceptionBecauseOfInvalidTypeParameter() throws NotExecutableException, 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.public void testValuesConstraintViolationExceptionBecauseOfInvalidTypeParameter() throws NotExecutableException, 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.Copyright © 2004–2023 The Apache Software Foundation. All rights reserved.