org.apache.jackrabbit.test.api
Class PropertyReadMethodsTest

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.PropertyReadMethodsTest
All Implemented Interfaces:
junit.framework.Test

public class PropertyReadMethodsTest
extends AbstractJCRTest

PropertyReadMethodsTest...


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
PropertyReadMethodsTest()
           
 
Method Summary
protected  void setUp()
          Sets up the fixture for this test.
protected  void tearDown()
          Releases the session aquired in setUp().
 void testAccept()
          Tests if a Property calls the correct visit method on an ItemVisitor.
 void testGetAncestorOfGreaterDepth()
          Test if getting the ancestor of depth = n, where n is greater than depth of this Property, throws an ItemNotFoundException.
 void testGetAncestorOfItemDepth()
          Test if the ancestor at depth = n, where n is the depth of this Item, returns this Property itself.
 void testGetAncestorOfNegativeDepth()
          Test if getting the ancestor of negative depth throws an ItemNotFoundException.
 void testGetDepth()
          Tests if depth of a property of depth of node + 1
 void testGetName()
          Tests if getName() returns same as last name returned by getPath()
 void testGetNode()
          Tests if Property.getNode() fails with ValueFormatException for multivalued properties.
 void testGetParent()
          Tests if getParent() returns parent node
 void testGetPath()
          Tests if getPath() returns the correct path.
 void testGetSession()
          Tests if getSession() is same as through which the Property was acquired
 void testGetValue()
          Tests failure of Property.getValue() method for a multivalue property.
 void testGetValueCopyStoredValues()
          Tests if Property.getValues() returns an array that is a copy of the stored values, so changes to it are not reflected in internal storage.
 void testGetValues()
          Tests failure of Property.getValues() method for a single value property.
 void testIsNode()
          Tests if isNode() returns false
 void testIsSame()
          Tests if isSame() returns true when retrieving a property through different sessions
 void testMultiValueType()
          Tests that all values of a multivalue property have the same property type.
 void testNoNullValue()
          Tests that no null value property exists in a given node tree.
 
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

PropertyReadMethodsTest

public PropertyReadMethodsTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Sets up the fixture for this test.

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

testGetPath

public void testGetPath()
                 throws NotExecutableException,
                        RepositoryException
Tests if getPath() returns the correct path.

Throws:
NotExecutableException
RepositoryException

testGetName

public void testGetName()
                 throws RepositoryException
Tests if getName() returns same as last name returned by getPath()

Throws:
RepositoryException

testGetAncestorOfItemDepth

public void testGetAncestorOfItemDepth()
                                throws RepositoryException
Test if the ancestor at depth = n, where n is the depth of this Item, returns this Property itself.

Throws:
RepositoryException

testGetAncestorOfGreaterDepth

public void testGetAncestorOfGreaterDepth()
                                   throws RepositoryException
Test if getting the ancestor of depth = n, where n is greater than depth of this Property, throws an ItemNotFoundException.

Throws:
RepositoryException

testGetAncestorOfNegativeDepth

public void testGetAncestorOfNegativeDepth()
                                    throws RepositoryException
Test if getting the ancestor of negative depth throws an ItemNotFoundException.

Throws:
RepositoryException

testGetParent

public void testGetParent()
                   throws RepositoryException
Tests if getParent() returns parent node

Throws:
RepositoryException

testGetDepth

public void testGetDepth()
                  throws RepositoryException
Tests if depth of a property of depth of node + 1

Throws:
RepositoryException

testGetSession

public void testGetSession()
                    throws RepositoryException
Tests if getSession() is same as through which the Property was acquired

Throws:
RepositoryException

testIsNode

public void testIsNode()
Tests if isNode() returns false


testIsSame

public void testIsSame()
                throws RepositoryException
Tests if isSame() returns true when retrieving a property through different sessions

Throws:
RepositoryException

testAccept

public void testAccept()
                throws RepositoryException
Tests if a Property calls the correct visit method on an ItemVisitor.

Throws:
RepositoryException

testNoNullValue

public void testNoNullValue()
                     throws RepositoryException
Tests that no null value property exists in a given node tree.

Throws:
RepositoryException

testMultiValueType

public void testMultiValueType()
                        throws RepositoryException,
                               NotExecutableException
Tests that all values of a multivalue property have the same property type.

Throws:
RepositoryException
NotExecutableException

testGetValue

public void testGetValue()
                  throws RepositoryException,
                         NotExecutableException
Tests failure of Property.getValue() method for a multivalue property.

Throws:
RepositoryException
NotExecutableException

testGetValues

public void testGetValues()
                   throws RepositoryException,
                          NotExecutableException
Tests failure of Property.getValues() method for a single value property.

Throws:
RepositoryException
NotExecutableException

testGetValueCopyStoredValues

public void testGetValueCopyStoredValues()
                                  throws NotExecutableException,
                                         RepositoryException
Tests if Property.getValues() returns an array that is a copy of the stored values, so changes to it are not reflected in internal storage.

Throws:
NotExecutableException
RepositoryException

testGetNode

public void testGetNode()
                 throws RepositoryException,
                        NotExecutableException
Tests if Property.getNode() fails with ValueFormatException for multivalued properties.

Throws:
RepositoryException
NotExecutableException


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