Package org.apache.jackrabbit.test.api
Class PropertyReadMethodsTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- 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
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 PropertyReadMethodsTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetUp()Sets up the fixture for this test.protected voidtearDown()Releases the session aquired insetUp().voidtestAccept()Tests if a Property calls the correct visit method on anItemVisitor.voidtestGetAncestorOfGreaterDepth()Test if getting the ancestor of depth = n, where n is greater than depth of thisProperty, throws anItemNotFoundException.voidtestGetAncestorOfItemDepth()Test if the ancestor at depth = n, where n is the depth of thisItem, returns thisPropertyitself.voidtestGetAncestorOfNegativeDepth()Test if getting the ancestor of negative depth throws anItemNotFoundException.voidtestGetDepth()Tests if depth of a property of depth of node + 1voidtestGetName()Tests if getName() returns same as last name returned by getPath()voidtestGetNode()Tests if Property.getNode() fails with ValueFormatException for multivalued properties.voidtestGetParent()Tests if getParent() returns parent nodevoidtestGetPath()Tests if getPath() returns the correct path.voidtestGetSession()Tests if getSession() is same as through which the Property was acquiredvoidtestGetValue()Tests failure of Property.getValue() method for a multivalue property.voidtestGetValueCopyStoredValues()Tests ifProperty.getValues()returns an array that is a copy of the stored values, so changes to it are not reflected in internal storage.voidtestGetValues()Tests failure of Property.getValues() method for a single value property.voidtestIsMultiple()Tests if isMultiple() is consistent with PropertyDefinition.isMultiple().voidtestIsNode()Tests if isNode() returns falsevoidtestIsSame()Tests if isSame() returns true when retrieving a property through different sessionsvoidtestMultiValueType()Tests that all values of a multivalue property have the same property type.voidtestNoNullValue()Tests that no null value property exists in a given node tree.-
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 ExceptionSets up the fixture for this test.- Overrides:
setUpin classAbstractJCRTest- Throws:
Exception
-
tearDown
protected void tearDown() throws ExceptionReleases the session aquired insetUp().- Overrides:
tearDownin classAbstractJCRTest- Throws:
Exception
-
testGetPath
public void testGetPath() throws NotExecutableException, RepositoryExceptionTests if getPath() returns the correct path.
-
testGetName
public void testGetName() throws RepositoryExceptionTests if getName() returns same as last name returned by getPath()- Throws:
RepositoryException
-
testGetAncestorOfItemDepth
public void testGetAncestorOfItemDepth() throws RepositoryExceptionTest if the ancestor at depth = n, where n is the depth of thisItem, returns thisPropertyitself.- Throws:
RepositoryException
-
testGetAncestorOfGreaterDepth
public void testGetAncestorOfGreaterDepth() throws RepositoryExceptionTest if getting the ancestor of depth = n, where n is greater than depth of thisProperty, throws anItemNotFoundException.- Throws:
RepositoryException
-
testGetAncestorOfNegativeDepth
public void testGetAncestorOfNegativeDepth() throws RepositoryExceptionTest if getting the ancestor of negative depth throws anItemNotFoundException.- Throws:
RepositoryException
-
testGetParent
public void testGetParent() throws RepositoryExceptionTests if getParent() returns parent node- Throws:
RepositoryException
-
testGetDepth
public void testGetDepth() throws RepositoryExceptionTests if depth of a property of depth of node + 1- Throws:
RepositoryException
-
testGetSession
public void testGetSession() throws RepositoryExceptionTests if getSession() is same as through which the Property was acquired- Throws:
RepositoryException
-
testIsMultiple
public void testIsMultiple() throws RepositoryExceptionTests if isMultiple() is consistent with PropertyDefinition.isMultiple().- Throws:
RepositoryException
-
testIsNode
public void testIsNode()
Tests if isNode() returns false
-
testIsSame
public void testIsSame() throws RepositoryExceptionTests if isSame() returns true when retrieving a property through different sessions- Throws:
RepositoryException
-
testAccept
public void testAccept() throws RepositoryExceptionTests if a Property calls the correct visit method on anItemVisitor.- Throws:
RepositoryException
-
testNoNullValue
public void testNoNullValue() throws RepositoryExceptionTests that no null value property exists in a given node tree.- Throws:
RepositoryException
-
testMultiValueType
public void testMultiValueType() throws RepositoryException, NotExecutableExceptionTests that all values of a multivalue property have the same property type.
-
testGetValue
public void testGetValue() throws RepositoryException, NotExecutableExceptionTests failure of Property.getValue() method for a multivalue property.
-
testGetValues
public void testGetValues() throws RepositoryException, NotExecutableExceptionTests failure of Property.getValues() method for a single value property.
-
testGetValueCopyStoredValues
public void testGetValueCopyStoredValues() throws NotExecutableException, RepositoryExceptionTests ifProperty.getValues()returns an array that is a copy of the stored values, so changes to it are not reflected in internal storage.
-
testGetNode
public void testGetNode() throws RepositoryException, NotExecutableExceptionTests if Property.getNode() fails with ValueFormatException for multivalued properties.
-
-