Package org.apache.jackrabbit.test.api
Class SessionReadMethodsTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.SessionReadMethodsTest
-
- All Implemented Interfaces:
junit.framework.Test
public class SessionReadMethodsTest extends AbstractJCRTest
SessionReadMethodsTest...
-
-
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 SessionReadMethodsTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetUp()protected voidtearDown()Releases the session aquired insetUp().voidtestGetAttribute()Tests if getAttribute(String name) returns not null if the requested attribute is existingvoidtestGetAttributeFailure()Tests if getAttribute(String name) returns null if the requested attribute is not existingvoidtestGetAttributeNames()Tests if attribute names returned by getAttributeNames() do not return null if used for getAttribute(String name)voidtestGetItem()Tests session.getItem() with the testRootNode and assures that the returned node represents the same node in the repository as testRootNode.voidtestGetItemFailure()Tests that session.getItem() throws a PathNotFoundException with a given path to nowhere.voidtestGetNodeByIdentifier()Tests session.getNodeByIdentifier()voidtestGetNodeByUUID()Tests session.getNodeByUUID() using a valid uuid of a referenceable nodevoidtestGetNodeByUUIDFailure()Tests that session.getNodeByUUID() throws a ItemNotFoundException in case of an invalid uuid.voidtestIsLive()Tests if isLive() returns true if theSessionis usable by the client and false if it is not usablevoidtestItemExists()Tests session.itemExists() in the case of a valid and an invalid path.-
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
protected void setUp() throws Exception- Overrides:
setUpin classAbstractJCRTest- Throws:
Exception
-
tearDown
protected void tearDown() throws ExceptionReleases the session aquired insetUp().- Overrides:
tearDownin classAbstractJCRTest- Throws:
Exception
-
testGetItemFailure
public void testGetItemFailure() throws RepositoryException, NotExecutableExceptionTests that session.getItem() throws a PathNotFoundException with a given path to nowhere.
-
testGetItem
public void testGetItem() throws RepositoryExceptionTests session.getItem() with the testRootNode and assures that the returned node represents the same node in the repository as testRootNode.- Throws:
RepositoryException
-
testItemExists
public void testItemExists() throws RepositoryExceptionTests session.itemExists() in the case of a valid and an invalid path.- Throws:
RepositoryException
-
testGetNodeByUUIDFailure
public void testGetNodeByUUIDFailure() throws RepositoryExceptionTests that session.getNodeByUUID() throws a ItemNotFoundException in case of an invalid uuid.- Throws:
RepositoryException
-
testGetNodeByUUID
public void testGetNodeByUUID() throws RepositoryException, NotExecutableExceptionTests session.getNodeByUUID() using a valid uuid of a referenceable node
-
testGetNodeByIdentifier
public void testGetNodeByIdentifier() throws RepositoryException, NotExecutableExceptionTests session.getNodeByIdentifier()- Throws:
RepositoryExceptionNotExecutableException- Since:
- JCR 2.0
-
testGetAttribute
public void testGetAttribute() throws NotExecutableExceptionTests if getAttribute(String name) returns not null if the requested attribute is existing- Throws:
NotExecutableException
-
testGetAttributeFailure
public void testGetAttributeFailure()
Tests if getAttribute(String name) returns null if the requested attribute is not existing
-
testGetAttributeNames
public void testGetAttributeNames()
Tests if attribute names returned by getAttributeNames() do not return null if used for getAttribute(String name)
-
testIsLive
public void testIsLive()
Tests if isLive() returns true if theSessionis usable by the client and false if it is not usable
-
-