public class AddNodeTest extends AbstractJCRTest
AddNodeTest contains the test cases for the method
Node.addNode(String, String).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 |
|---|
AddNodeTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testAbstractNodeType()
Tests if addNode() throws a ConstraintViolationException in case
of an abstract node type.
|
void |
testAddNodeParentSave()
Creates a new node using
Node.addNode(String,String), saves using
Item.save() on parent node. |
void |
testAddNodeRepositoryExceptionSaveOnNewNode()
Creates a new node using
Node.addNode(String, String), then tries
to call Item.save() on the new node. |
void |
testAddNodeSessionSave()
Creates a new node using
Node.addNode(String, String), saves using
Session.save(). |
void |
testConstraintViolation()
Tests if a ConstraintViolationException is thrown when one attempts
to add a node at a path that references a property.
|
void |
testMixinNodeType()
Tests if addNode() throws a ConstraintViolationException in case
of an mixin node type.
|
void |
testName()
Tests if the name of the created node is correct.
|
void |
testNodeType()
Tests if the node type of the created node is correct.
|
void |
testPath()
Tests if the path of the created node is correct.
|
void |
testPathNotFound()
Tests if addNode() throws a PathNotFoundException in case
intermediary nodes do not exist.
|
void |
testRepositoryException()
Tests if a RepositoryException is thrown in case the path
for the new node contains an index.
|
void |
testSameNameSiblings()
Tests if same name siblings have equal names or if same name
siblings are not supported a ItemExistsException is thrown.
|
void |
testSimilarNodeNamesNfcNfd()
Tests the behavior with respect to Unicode normalization
|
void |
testSimilarNodeNamesUpperLower()
Tests the behavior with respect to case-sensitivity
|
void |
testUnknownNodeType()
Tests if addNode() throws a NoSuchNodeTypeException in case
of an unknown node type.
|
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, run, setUp, tearDownassertEquals, 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 testName()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testNodeType()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testSameNameSiblings()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testUnknownNodeType()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testAbstractNodeType()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testMixinNodeType()
throws javax.jcr.RepositoryException,
NotExecutableException
javax.jcr.RepositoryExceptionNotExecutableExceptionpublic void testPath()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testPathNotFound()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testConstraintViolation()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testRepositoryException()
public void testAddNodeParentSave()
throws javax.jcr.RepositoryException
Node.addNode(String,String), saves using
Item.save() on parent node. Uses a second session to
verify if the node have been saved.javax.jcr.RepositoryExceptionpublic void testAddNodeSessionSave()
throws javax.jcr.RepositoryException
Node.addNode(String, String), saves using
Session.save(). Uses a second session to verify if the
node has been safed.javax.jcr.RepositoryExceptionpublic void testAddNodeRepositoryExceptionSaveOnNewNode()
throws javax.jcr.RepositoryException
Node.addNode(String, String), then tries
to call Item.save() on the new node.
This should throw an RepositoryException.
javax.jcr.RepositoryExceptionpublic void testSimilarNodeNamesUpperLower()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testSimilarNodeNamesNfcNfd()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.