|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.opencms.test.OpenCmsTestCase
org.opencms.file.TestHistory
public class TestHistory
Unit tests for history operation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.opencms.test.OpenCmsTestCase |
---|
OpenCmsTestCase.ConnectionData |
Field Summary |
---|
Fields inherited from class org.opencms.test.OpenCmsTestCase |
---|
ARTICLE_TYPEID, DB_MYSQL, DB_ORACLE, m_additionalConnection, m_configuration, m_currentResourceStrorage, m_defaultConnection, m_defaultTablespace, m_indexTablespace, m_resourceStorages, m_setupConnection, m_tempTablespace |
Constructor Summary | |
---|---|
TestHistory(String arg0)
Default JUnit constructor. |
Method Summary | |
---|---|
protected String |
getContentString(CmsObject cms,
byte[] content)
Turns the byte content of a resource into a string. |
static junit.framework.Test |
suite()
Test suite for this test class. |
void |
testCreateAndDeleteFile()
Creates and deletes a file n-times and tests if the historical data are correct and if the content can be properly restored. |
void |
testCreateAndDeleteFolder()
Creates and deletes a folder n-times and tests if the historical data are correct and if the properties can be properly restored. |
void |
testDeleteDate()
Tests the delete date of deleted resources. |
void |
testFileHistory()
Creates a file, modifies and publishes it n-times, create a sibling, publishes both and compares the histories. |
void |
testFileHistoryFileWithSibling()
creates a file, modifies and publishes it n-times, create 2 siblings, delete file and sibling N2, delete some versions from history, restore file and sibling from history and compare contents. |
void |
testFileRestore()
Test restoring a file also possible missing folders are restored. |
void |
testFileRestoreIteration()
Test restoring and deleting a file several times. |
void |
testFileVersions()
Test the version numbers of a file after several modifications. |
void |
testMoveFile()
Moves a resource n-times and tests if the version ID of the history resources are correct and if the content could be restored for a specified version ID. |
void |
testPathHistory()
Tests reconstructing the resource path for the history. |
void |
testReadDeleted()
Tests the retrieval of deleted resources by name in a folder. |
void |
testSiblingRestoreIteration()
Test restoring and deleting a sibling several times. |
void |
testSiblingsEdition()
Test a create and edit siblings scenario. |
void |
testSiblingsRestoration()
Test a sibling restoration scenario. |
void |
testSiblingsV7HistoryIssue()
Tests an issue present in OpenCms 7 siblings have a wrong history. |
void |
testSiblingsV7HistoryIssue2()
Tests an issue present in OpenCms 7 siblings have a wrong history. |
void |
testSiblingVersions()
Test the version number of siblings after different operations. |
void |
testVersioningLimit()
Test that the versions are properly updated after reaching the limit of stored versions. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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 TestHistory(String arg0)
arg0
- JUnit parametersMethod Detail |
---|
public static junit.framework.Test suite()
public void testCreateAndDeleteFile() throws Throwable
Throwable
- if something goes wrongpublic void testCreateAndDeleteFolder() throws Throwable
Throwable
- if something goes wrongpublic void testDeleteDate() throws Throwable
Throwable
- if something goes wrongpublic void testFileHistory() throws Throwable
Throwable
- if something goes wrongpublic void testFileHistoryFileWithSibling() throws Throwable
Throwable
- if something goes wrongpublic void testFileRestore() throws Throwable
Throwable
- if something goes wrongpublic void testFileRestoreIteration() throws Throwable
Throwable
- if something goes wrongpublic void testFileVersions() throws Throwable
Throwable
- if something goes wrongpublic void testMoveFile() throws Throwable
Throwable
- if something goes wrongpublic void testPathHistory() throws Throwable
Throwable
- if something goes wrongpublic void testReadDeleted() throws Throwable
Throwable
- if something goes wrongpublic void testSiblingRestoreIteration() throws Throwable
Throwable
- if something goes wrongpublic void testSiblingsEdition() throws Throwable
Throwable
- if something goes wrongpublic void testSiblingsRestoration() throws Throwable
Throwable
- if something goes wrongpublic void testSiblingsV7HistoryIssue() throws Exception
Exception
- if the test failspublic void testSiblingsV7HistoryIssue2() throws Exception
Exception
- if the test failspublic void testSiblingVersions() throws Throwable
Throwable
- if something goes wrongpublic void testVersioningLimit() throws Throwable
Throwable
- if something goes wrongprotected String getContentString(CmsObject cms, byte[] content)
cms
- the current user's Cms objectcontent
- the byte content of a resource
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |