org.apache.jackrabbit.test.api
Class SessionReadMethodsTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jackrabbit.test.JUnitTest
              extended by org.apache.jackrabbit.test.AbstractJCRTest
                  extended by 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
helper, isReadOnly, jcrBaseVersion, jcrCreated, jcrFrozenNode, jcrFrozenUuid, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntBase, ntFrozenNode, ntQuery, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testPath, testRoot, testRootNode, workspaceName
 
Fields inherited from class org.apache.jackrabbit.test.JUnitTest
log
 
Constructor Summary
SessionReadMethodsTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
          Releases the session aquired in setUp().
 void testGetAttribute()
          Tests if getAttribute(String name) returns not null if the requested attribute is existing
 void testGetAttributeFailure()
          Tests if getAttribute(String name) returns null if the requested attribute is not existing
 void testGetAttributeNames()
          Tests if attribute names returned by getAttributeNames() do not return null if used for getAttribute(String name)
 void testGetItem()
          Tests session.getItem() with the testRootNode and assures that the returned node represents the same node in the repository as testRootNode.
 void testGetItemFailure()
          Tests that session.getItem() throws a PathNotFoundException with a given path to nowhere.
 void testGetNodeByUUID()
          Tests session.getNodeByUUID() using a valid uuid of a referenceable node
 void testGetNodeByUUIDFailure()
          Tests that session.getNodeByUUID() throws a ItemNotFoundException in case of an invalid uuid.
 void testIsLive()
          Tests if isLive() returns true if the Session is usable by the client and false if it is not usable
 void testItemExists()
          Tests session.itemExists() in the case of a valid and an invalid path.
 
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest
cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureMultipleWorkspacesSupported, getNonExistingWorkspaceName, getProperty, getSize, isSupported, needsMixin, run
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SessionReadMethodsTest

public SessionReadMethodsTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class AbstractJCRTest
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Releases the session aquired in setUp().

Overrides:
tearDown in class AbstractJCRTest
Throws:
Exception

testGetItemFailure

public void testGetItemFailure()
                        throws RepositoryException,
                               NotExecutableException
Tests that session.getItem() throws a PathNotFoundException with a given path to nowhere.

Throws:
RepositoryException
NotExecutableException

testGetItem

public void testGetItem()
                 throws RepositoryException
Tests 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 RepositoryException
Tests session.itemExists() in the case of a valid and an invalid path.

Throws:
RepositoryException

testGetNodeByUUIDFailure

public void testGetNodeByUUIDFailure()
                              throws RepositoryException
Tests that session.getNodeByUUID() throws a ItemNotFoundException in case of an invalid uuid.

Throws:
RepositoryException

testGetNodeByUUID

public void testGetNodeByUUID()
                       throws RepositoryException,
                              NotExecutableException
Tests session.getNodeByUUID() using a valid uuid of a referenceable node

Throws:
RepositoryException
NotExecutableException

testGetAttribute

public void testGetAttribute()
                      throws NotExecutableException
Tests 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 the Session is usable by the client and false if it is not usable



Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.