org.apache.jackrabbit.test.api
Class PropertyReadMethodsTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.jackrabbit.test.JUnitTest
              extended byorg.apache.jackrabbit.test.AbstractJCRTest
                  extended byorg.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, 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, 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 that a ValueFormatExcdption is thrown in case Property.getNode is called on a multivalued exception.
 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
createRandomString, getNonExistingWorkspaceName, getProperty, getSize, 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 java.lang.Exception
Sets up the fixture for this test.

Overrides:
setUp in class AbstractJCRTest
Throws:
java.lang.Exception

tearDown

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

Overrides:
tearDown in class AbstractJCRTest
Throws:
java.lang.Exception

testGetPath

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

Throws:
NotExecutableException
javax.jcr.RepositoryException

testGetName

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

Throws:
javax.jcr.RepositoryException

testGetAncestorOfItemDepth

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

Throws:
javax.jcr.RepositoryException

testGetAncestorOfGreaterDepth

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

Throws:
javax.jcr.RepositoryException

testGetAncestorOfNegativeDepth

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

Throws:
javax.jcr.RepositoryException

testGetParent

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

Throws:
javax.jcr.RepositoryException

testGetDepth

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

Throws:
javax.jcr.RepositoryException

testGetSession

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

Throws:
javax.jcr.RepositoryException

testIsNode

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


testIsSame

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

Throws:
javax.jcr.RepositoryException

testAccept

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

Throws:
javax.jcr.RepositoryException

testNoNullValue

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

Throws:
javax.jcr.RepositoryException

testMultiValueType

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

Throws:
javax.jcr.RepositoryException
NotExecutableException

testGetValue

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

Throws:
javax.jcr.RepositoryException
NotExecutableException

testGetValues

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

Throws:
javax.jcr.RepositoryException

testGetValueCopyStoredValues

public void testGetValueCopyStoredValues()
                                  throws NotExecutableException,
                                         javax.jcr.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
javax.jcr.RepositoryException

testGetNode

public void testGetNode()
                 throws javax.jcr.RepositoryException,
                        NotExecutableException
Tests that a ValueFormatExcdption is thrown in case Property.getNode is called on a multivalued exception.

Throws:
javax.jcr.RepositoryException
NotExecutableException


Copyright © -2005 . All Rights Reserved.