public class VersionLabelTest extends AbstractVersionTest
VersionLabelTest covers methods related to version label such as
VersionHistory.addVersionLabel(String, String, boolean)VersionHistory.removeVersionLabel(String)Node.restoreByLabel(String, boolean) VersionHistory.getVersionByLabel(String)VersionHistory.getVersionLabels() VersionHistory.hasVersionLabel(javax.jcr.version.Version, String)VersionHistory.hasVersionLabel(String)VersionHistory.hasVersionLabel(javax.jcr.version.Version, String) | Modifier and Type | Field and Description |
|---|---|
protected String |
jcrVersionLabels
JCR Name jcr:versionLabels using the namespace resolver of the current session.
|
protected javax.jcr.version.Version |
version |
protected String |
versionLabel |
protected String |
versionLabel2 |
protected javax.jcr.version.VersionHistory |
vHistory |
nonVersionableNode, nonVersionableNodeType, propertyValue, versionableNode, versionableNodeTypeisReadOnly, 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, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testNodeTypeTestRoot, testPath, testRoot, testRootNode, vf, workspaceName| Constructor and Description |
|---|
VersionLabelTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
setUp() |
protected void |
tearDown() |
void |
testAddDuplicateVersionLabel()
Test if VersionHistory.addVersionLabel(versionName, label, moveLabel)
throws VersionException the label already exists and if moveLabel is false)
|
void |
testAddDuplicateVersionLabelJcr2()
Test if VersionHistory.addVersionLabel(versionName, label, moveLabel)
throws VersionException the label already exists and if moveLabel is false)
|
void |
testAddMultipleVersionLabels()
Test if multiple distinct version labels can be added for a given version.
|
void |
testAddVersionCheckVersionLabelsNode()
Test if the a label added with VersionHistory.addVersionLabel(String,
String, boolean) corresponds to adding a reference property to the
jcr:versionLabels node of this history node, with the label as name of
the property, and the reference targeting the version.
|
void |
testAddVersionCheckVersionLabelsNodeJcr2()
Test if the a label added with VersionHistory.addVersionLabel(String,
String, boolean) corresponds to adding a reference property to the
jcr:versionLabels node of this history node, with the label as name of
the property, and the reference targeting the version.
|
void |
testAddVersionLabel()
Test if the number of labels available in the version history is increased
by added a new label.
|
void |
testAddVersionLabel2()
Test if the a label added with VersionHistory.addVersionLabel(String, String, boolean)
is present in the array returned by VersionHistory.getVersionLabels(), if
the label has not been present before.
|
void |
testGetVersionByLabel()
Test if VersionHistory.getVersionByLabel(String) returns the version that
has been specified with the addVersionLabel call.
|
void |
testGetVersionLabels()
Test VersionHistory.getVersionLabels() returns all labels present on the version history.
|
void |
testGetVersionLabelsForInvalidVersion()
Test if versionHistory.getVersionLabels(Version) throws a VersionException if the
specified version is not in this version history.
|
void |
testGetVersionLabelsForVersion()
Test VersionHistory.getVersionLabels(Version) only returns all labels present
for the specified version.
|
void |
testGetVersionLabelsForVersionJcr2()
Test VersionHistory.getVersionLabels(Version) only returns all labels present
for the specified version.
|
void |
testGetVersionLabelsJcr2()
Test VersionHistory.getVersionLabels() returns all labels present on the version history.
|
void |
testHasVersionLabel()
Test if VersionHistory.hasVersionLabel(String) returns true, if the label
has beed successfully added before.
|
void |
testHasVersionLabelForVersion()
Test if VersionHistory.hasVersionLabel(Version, String) returns true, if the label
has beed successfully added before to the specified version.
|
void |
testMoveLabel()
Test if the 'moveLabel' flag moves an existing version label.
|
void |
testMoveLabelJcr2()
Test if the 'moveLabel' flag moves an existing version label.
|
void |
testRemoveLabel()
Test the removal of an version label that has successfully been added
before.
|
void |
testRemoveNonExistingLabel()
Test the removal of an version label that does not exist (must throw VersionException).
|
void |
testRestoreByLabelNonVersionableNode()
Test calling Node.restoreByLabel(String, boolean) on a non-versionable node.
|
void |
testRestoreByLabelNonVersionableNodeJcr2()
Test calling Node.restoreByLabel(String, boolean) on a non-versionable node.
|
createVersionableNode, getNumberOfVersionscheckSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, runassertEquals, 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, toStringprotected String versionLabel
protected String versionLabel2
protected javax.jcr.version.VersionHistory vHistory
protected javax.jcr.version.Version version
protected String jcrVersionLabels
protected void setUp()
throws Exception
setUp in class AbstractVersionTestExceptionprotected void tearDown()
throws Exception
tearDown in class AbstractVersionTestExceptionpublic void testAddVersionLabel()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.addVersionLabel(String, String, boolean)public void testAddVersionLabel2()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.addVersionLabel(String, String, boolean)public void testAddVersionCheckVersionLabelsNode()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.addVersionLabel(String, String, boolean)public void testAddVersionCheckVersionLabelsNodeJcr2()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.addVersionLabel(String, String, boolean)public void testHasVersionLabel()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.hasVersionLabel(String)public void testHasVersionLabelForVersion()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.hasVersionLabel(javax.jcr.version.Version, String)public void testAddMultipleVersionLabels()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testAddDuplicateVersionLabel()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testAddDuplicateVersionLabelJcr2()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testMoveLabel()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionwith boolan flag equals true.public void testMoveLabelJcr2()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionwith boolan flag equals true.public void testRemoveNonExistingLabel()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void testRemoveLabel()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.removeVersionLabel(String)public void testGetVersionByLabel()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.getVersionByLabel(String)public void testGetVersionLabels()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.getVersionLabels()public void testGetVersionLabelsJcr2()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.getVersionLabels()public void testGetVersionLabelsForVersion()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.getVersionLabels(javax.jcr.version.Version)public void testGetVersionLabelsForVersionJcr2()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionVersionHistory.getVersionLabels(javax.jcr.version.Version)public void testRestoreByLabelNonVersionableNode()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionNode.restoreByLabel(String, boolean)public void testRestoreByLabelNonVersionableNodeJcr2()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionNode.restoreByLabel(String, boolean)Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.