public class NodeReadMethodsTest extends AbstractJCRTest
Node interface on
a level 1 repository.
Most tests require at least one child node under the root node, otherwise a
NotExecutableException is thrown.
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 |
|---|
NodeReadMethodsTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
setUp()
Sets up the fixture for this test.
|
protected void |
tearDown()
Releases the session aquired in
setUp(). |
void |
testAccept() |
void |
testGetAncestorOfGreaterDepth()
Test if getting the ancestor of depth = n, where n is greater than depth
of this
Node, throws an ItemNotFoundException. |
void |
testGetAncestorOfNegativeDepth()
Test if getting the ancestor of negative depth throws an
ItemNotFoundException. |
void |
testGetAncestorOfNodeDepth()
Test if the ancestor at depth = n, where n is the depth of this
Item, returns this Node itself. |
void |
testGetDepth()
Tests if depth of root is 0 and depth of a sub node of root is 1
|
void |
testGetIndex()
Test if getIndex() returns the correct index.
|
void |
testGetName()
Tests if getName() returns same as last name returned by getPath()
|
void |
testGetNode()
Test if getNode(String relPath) returns the correct node and if a
PathNotFoundException is thrown when Node at relPath does not exist
|
void |
testGetNodes()
Test if all returned items are of type node.
|
void |
testGetNodesNamePattern()
Test getNodes(String namePattern) with all possible patterns.
|
void |
testGetNodesNamePatternArray()
Test getNodes(String[] namePattern) with all possible patterns.
|
void |
testGetParent()
Tests if getParent() returns parent node
|
void |
testGetParentOfRoot()
Tests if getParent() of root throws an ItemNotFoundException
|
void |
testGetPath()
Tests if getPath() returns the correct path.
|
void |
testGetPrimaryItem()
Test if getPrimaryItem returns the primary item as defined in the primary
node type.
|
void |
testGetPrimaryItemItemNotFoundException()
Test if getPrimaryItem does throw an ItemNotFoundException if the primary
node type does not define a primary item.
|
void |
testGetProperties()
Test if all returned items are of type node.
|
void |
testGetPropertiesNamePattern()
Test getProperties(String namePattern) with all possible patterns.
|
void |
testGetPropertiesNamePatternArray()
Test getProperties(String[] namePattern) with all possible patterns.
|
void |
testGetProperty()
Test if getProperty(String relPath) returns the correct node and if a
PathNotFoundException is thrown when property at relPath does not exist
|
void |
testGetReferences() |
void |
testGetSession()
Tests if getSession() is same as through which the Item was acquired
|
void |
testGetUUID()
Test if getUUID() returns the string value of the property "jcr:uuid".
|
void |
testGetUUIDOfNonReferenceableNode()
Test if getUUID() throws a UnsupportedRepositoryOperationException if
Node is not referenceable
|
void |
testHasNode()
Test if hasNode(String relPath) returns true if the required node exists
and false if it doesn't.
|
void |
testHasNodes()
Test if hasNodes() returns true if any sub node exists or false if not.
|
void |
testHasProperties()
Test if hasProperty() returns true if any property exists or false if
not.
|
void |
testHasProperty()
Test if hasProperty(String relPath) returns true if a required property
exists and false if it doesn't.
|
void |
testIsNode()
Tests if isNode() returns true
|
void |
testIsSame()
Tests if isSame() returns true when retrieving an item through different
sessions
|
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, toStringprotected void setUp()
throws Exception
setUp in class AbstractJCRTestExceptionprotected void tearDown()
throws Exception
setUp().tearDown in class AbstractJCRTestExceptionpublic void testGetPath()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetName()
throws javax.jcr.RepositoryException,
NotExecutableException
javax.jcr.RepositoryExceptionNotExecutableExceptionpublic void testGetAncestorOfNodeDepth()
throws javax.jcr.RepositoryException
Item, returns this Node itself.javax.jcr.RepositoryExceptionpublic void testGetAncestorOfGreaterDepth()
throws javax.jcr.RepositoryException
Node, throws an ItemNotFoundException.javax.jcr.RepositoryExceptionpublic void testGetAncestorOfNegativeDepth()
throws javax.jcr.RepositoryException
ItemNotFoundException.javax.jcr.RepositoryExceptionpublic void testGetParent()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetParentOfRoot()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testGetDepth()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testGetSession()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testIsNode()
public void testIsSame()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testAccept()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testGetNode()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetNodes()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testGetNodesNamePattern()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetNodesNamePatternArray()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableException - is thrown when root node has no sub
nodes.javax.jcr.RepositoryExceptionpublic void testGetProperty()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetProperties()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testGetPropertiesNamePattern()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetPropertiesNamePatternArray()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableException - is thrown when root node has no properties.javax.jcr.RepositoryExceptionpublic void testGetPrimaryItem()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetPrimaryItemItemNotFoundException()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetIndex()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testGetReferences()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetUUID()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testGetUUIDOfNonReferenceableNode()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testHasNode()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testHasNodes()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testHasProperty()
throws NotExecutableException,
javax.jcr.RepositoryException
NotExecutableExceptionjavax.jcr.RepositoryExceptionpublic void testHasProperties()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.