|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.apache.jackrabbit.test.JUnitTest org.apache.jackrabbit.test.AbstractJCRTest org.apache.jackrabbit.test.api.AddNodeTest
public class AddNodeTest
AddNodeTest
contains the test cases for the method
Node.addNode(String, String)
.
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, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testPath, testRoot, testRootNode, vf, workspaceName |
Fields inherited from class org.apache.jackrabbit.test.JUnitTest |
---|
log |
Constructor Summary | |
---|---|
AddNodeTest()
|
Method Summary | |
---|---|
void |
testAbstractNodeType()
Tests if addNode() throws a ConstraintViolationException in case of an abstract node type. |
void |
testAddNodeParentSave()
Creates a new node using Node.addNode(String,String) , saves using
Item.save() on parent node. |
void |
testAddNodeRepositoryExceptionSaveOnNewNode()
Creates a new node using Node.addNode(String, String) , then tries
to call Item.save() on the new node. |
void |
testAddNodeSessionSave()
Creates a new node using Node.addNode(String, String) , saves using
Session.save() . |
void |
testConstraintViolation()
Tests if a ConstraintViolationException is thrown when one attempts to add a node at a path that references a property. |
void |
testMixinNodeType()
Tests if addNode() throws a ConstraintViolationException in case of an mixin node type. |
void |
testName()
Tests if the name of the created node is correct. |
void |
testNodeType()
Tests if the node type of the created node is correct. |
void |
testPath()
Tests if the path of the created node is correct. |
void |
testPathNotFound()
Tests if addNode() throws a PathNotFoundException in case intermediary nodes do not exist. |
void |
testRepositoryException()
Tests if a RepositoryException is thrown in case the path for the new node contains an index. |
void |
testSameNameSiblings()
Tests if same name siblings have equal names or if same name siblings are not supported a ItemExistsException is thrown. |
void |
testUnknownNodeType()
Tests if addNode() throws a NoSuchNodeTypeException in case of an unknown node type. |
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest |
---|
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getProperty, getProperty, getSize, isSupported, needsMixin, run, setUp, tearDown |
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 |
---|
public AddNodeTest()
Method Detail |
---|
public void testName() throws RepositoryException
RepositoryException
public void testNodeType() throws RepositoryException
RepositoryException
public void testSameNameSiblings() throws RepositoryException
RepositoryException
public void testUnknownNodeType() throws RepositoryException
RepositoryException
public void testAbstractNodeType() throws RepositoryException
RepositoryException
public void testMixinNodeType() throws RepositoryException, NotExecutableException
RepositoryException
NotExecutableException
public void testPath() throws RepositoryException
RepositoryException
public void testPathNotFound() throws RepositoryException
RepositoryException
public void testConstraintViolation() throws RepositoryException
RepositoryException
public void testRepositoryException()
public void testAddNodeParentSave() throws RepositoryException
Node.addNode(String,String)
, saves using
Item.save()
on parent node. Uses a second session to
verify if the node have been saved.
RepositoryException
public void testAddNodeSessionSave() throws RepositoryException
Node.addNode(String, String)
, saves using
Session.save()
. Uses a second session to verify if the
node has been safed.
RepositoryException
public void testAddNodeRepositoryExceptionSaveOnNewNode() throws RepositoryException
Node.addNode(String, String)
, then tries
to call Item.save()
on the new node.
This should throw an RepositoryException
.
RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |