org.opencms.file
Class TestPublishing

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.opencms.test.OpenCmsTestCase
              extended by org.opencms.file.TestPublishing
All Implemented Interfaces:
junit.framework.Test

public class TestPublishing
extends OpenCmsTestCase

Unit tests for OpenCms publishing.


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
TestPublishing(String arg0)
          Default JUnit constructor.
 
Method Summary
static junit.framework.Test suite()
          Test suite for this test class.
 void testPublishChangedFiles()
          Test publishing changed files.
 void testPublishContentDate()
          Tests the behaviour during publishing depending on the content date.
 void testPublishCopySibling()
          Tests the publishing of a fresh created sibling.
 void testPublishDeletedFiles()
          Test publishing deleted files.
 void testPublishDeletedSiblings()
          Tests the publishing of deleted siblings.
 void testPublishDeletedSiblings2()
          Tests the publishing of deleted siblings, 2nd issue.
 void testPublishFolderWithLockedFiles()
          Test publishing a folder with locked files.
 void testPublishLockedFiles()
          Test publishing changed files.
 void testPublishMovedFiles()
          Test publishing moved files.
 void testPublishNewFiles()
          Test publishing new files.
 void testPublishNewFilesInNewFolder()
          Test publishing files within a new unpublished folder.
 void testPublishProjectGalore()
          Test publishing a project with an iteration.
 void testPublishProjectLastmodified()
          Tests publishing resources within a distinct project.
 void testPublishProjectLastmodifiedFolder()
          Tests publishing a folder containing resources modified within a distinct project.
 void testPublishQueueIssue1()
          Test an issue with the publish queue when trying to publish a folder that has already a subresource that is being published.
 void testPublishQueueIssue2()
          Test an issue with the publish queue when trying to publish a folder that has already a subresource that is being published.
 void testPublishQueueIssue3()
          Test an issue with the publish queue when trying to publish a folder that has already a subresource that is being published.
 void testPublishRelatedFiles()
          Test publishing of related files.
 void testPublishRelatedFilesInFolder()
          Test publishing of related files taken a whole folder structure.
 void testPublishRelatedFilesInNewFolder()
          Test publishing of related files in an unpublished folder.
 void testPublishReplacedFile()
          Test publishing a replaced file.
 void testPublishResourceGalore()
          Test publishing a single resource with an iteration.
 void testPublishResourceProperty()
          Tests the publishing of resource property.
 void testPublishResourceWithRelatedGalore()
          Test publishing a resource with related resources with an iteration.
 void testPublishSiblings()
          Tests the publishing of structure/shared properties.
 void testPublishStructureProperty()
          Tests the publishing of structure property.
 void testPublishTemporaryProject()
          Test publishing a temporary project.
 
Methods inherited from class org.opencms.test.OpenCmsTestCase
addTestDataPath, assertAce, assertAcl, assertAcl, assertContains, assertContainsNot, assertContent, assertDateContent, assertDateContentAfter, assertDateCreated, assertDateCreatedAfter, assertDateExpired, assertDateLastModified, assertDateLastModifiedAfter, assertDateReleased, assertEquals, assertEquals, assertEquals, assertFilter, assertFilter, assertFilter, assertFilter, assertFlags, assertHistory, assertHistoryForRestored, assertIsFolder, assertIsIdentical, assertIsNotIdentical, assertLock, assertLock, assertLock, assertModifiedInCurrentProject, assertPermissionString, assertProject, assertPropertyChanged, assertPropertyChanged, assertPropertydefinitionExist, assertPropertydefinitions, assertPropertyEqual, assertPropertyNew, assertPropertyNew, assertPropertyRemoved, assertPropertyRemoved, assertRelation, assertResourceId, assertResourceType, assertSiblingCount, assertSiblingCountIncremented, assertState, assertStructureId, assertType, assertUserCreated, assertUserLastModified, assertVersion, checkErrors, createStorage, deleteFile, echo, generateContent, generateContent, generateName, generateProperties, generateResources, generateSetupTestWrapper, generateUsers, getCmsObject, getConnectionName, getDatabaseProduct, getDbProduct, getPreCalculatedState, getReplacer, getSetupDataPath, getSetupDb, getTestDataPath, importData, importResources, importTestResource, initTestDataPath, removeDatabase, removeDatabase, removeOpenCms, removeStorage, resetMapping, restart, restartOpenCms, setMapping, setupDatabase, setupDatabase, setupOpenCms, setupOpenCms, setupOpenCms, setupOpenCms, setupOpenCms, storeResources, storeResources, switchStorage
 
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

TestPublishing

public TestPublishing(String arg0)
Default JUnit constructor.

Parameters:
arg0 - JUnit parameters
Method Detail

suite

public static junit.framework.Test suite()
Test suite for this test class.

Returns:
the test suite

testPublishQueueIssue2

public void testPublishQueueIssue2()
                            throws Throwable
Test an issue with the publish queue when trying to publish a folder that has already a subresource that is being published.

SECOND TRY: - modify and lock a file, publish the file - lock the folder, modify a second file, publish the folder

Throws:
Throwable - if something goes wrong

testPublishQueueIssue3

public void testPublishQueueIssue3()
                            throws Throwable
Test an issue with the publish queue when trying to publish a folder that has already a subresource that is being published.

THIRD TRY: - modify and lock a file, publish the file - modify and lock the folder, publish the folder

Throws:
Throwable - if something goes wrong

testPublishQueueIssue1

public void testPublishQueueIssue1()
                            throws Throwable
Test an issue with the publish queue when trying to publish a folder that has already a subresource that is being published.

FIRST TRY: - modify and lock a file, publish the file - modify and lock a second file, publish the folder

Throws:
Throwable - if something goes wrong

testPublishChangedFiles

public void testPublishChangedFiles()
                             throws Throwable
Test publishing changed files.

Throws:
Throwable - if something goes wrong

testPublishContentDate

public void testPublishContentDate()
                            throws Throwable
Tests the behaviour during publishing depending on the content date.

Throws:
Throwable - if something goes wrong

testPublishCopySibling

public void testPublishCopySibling()
                            throws Throwable
Tests the publishing of a fresh created sibling.

take a modified resource: - create a sibling of it - publish only the sibling - compare online/offline versions of the sibling

Throws:
Throwable - if something goes wrong

testPublishDeletedFiles

public void testPublishDeletedFiles()
                             throws Throwable
Test publishing deleted files.

Throws:
Throwable - if something goes wrong

testPublishDeletedSiblings

public void testPublishDeletedSiblings()
                                throws Throwable
Tests the publishing of deleted siblings.

take 2 siblings (s1 and s2): - delete one - publish the deleted one - the remaining sibling should be readable in online project - the deleted sibling should be eligible for restoration

Throws:
Throwable - if something goes wrong

testPublishDeletedSiblings2

public void testPublishDeletedSiblings2()
                                 throws Throwable
Tests the publishing of deleted siblings, 2nd issue.

take 2 siblings (s1 and s2): - delete all - publish all - non of them should be readable - both siblings should be eligible for restoration

Throws:
Throwable - if something goes wrong

testPublishFolderWithLockedFiles

public void testPublishFolderWithLockedFiles()
                                      throws Throwable
Test publishing a folder with locked files.

Throws:
Throwable - if something goes wrong

testPublishLockedFiles

public void testPublishLockedFiles()
                            throws Throwable
Test publishing changed files.

Throws:
Throwable - if something goes wrong

testPublishMovedFiles

public void testPublishMovedFiles()
                           throws Throwable
Test publishing moved files.

Throws:
Throwable - if something goes wrong

testPublishNewFiles

public void testPublishNewFiles()
                         throws Throwable
Test publishing new files.

Throws:
Throwable - if something goes wrong

testPublishNewFilesInNewFolder

public void testPublishNewFilesInNewFolder()
                                    throws Throwable
Test publishing files within a new unpublished folder.

Throws:
Throwable - if something goes wrong

testPublishProjectGalore

public void testPublishProjectGalore()
                              throws Throwable
Test publishing a project with an iteration.

Throws:
Throwable - if something goes wrong

testPublishProjectLastmodified

public void testPublishProjectLastmodified()
                                    throws Throwable
Tests publishing resources within a distinct project.

Throws:
Throwable - if something goes wrong

testPublishProjectLastmodifiedFolder

public void testPublishProjectLastmodifiedFolder()
                                          throws Throwable
Tests publishing a folder containing resources modified within a distinct project.

Throws:
Throwable - if something goes wrong

testPublishRelatedFiles

public void testPublishRelatedFiles()
                             throws Throwable
Test publishing of related files.

Throws:
Throwable - if something goes wrong

testPublishRelatedFilesInFolder

public void testPublishRelatedFilesInFolder()
                                     throws Throwable
Test publishing of related files taken a whole folder structure.

Throws:
Throwable - if something goes wrong

testPublishRelatedFilesInNewFolder

public void testPublishRelatedFilesInNewFolder()
                                        throws Throwable
Test publishing of related files in an unpublished folder.

Throws:
Throwable - if something goes wrong

testPublishReplacedFile

public void testPublishReplacedFile()
                             throws Throwable
Test publishing a replaced file.

Throws:
Throwable - if something goes wrong

testPublishResourceGalore

public void testPublishResourceGalore()
                               throws Throwable
Test publishing a single resource with an iteration.

Throws:
Throwable - if something goes wrong

testPublishResourceProperty

public void testPublishResourceProperty()
                                 throws Throwable
Tests the publishing of resource property.

take 2 siblings (s1 and s2): - change a shared property of s1 - s2 will be marked as changed also - direct publishing s1, should also change s2

Throws:
Throwable - if something goes wrong

testPublishResourceWithRelatedGalore

public void testPublishResourceWithRelatedGalore()
                                          throws Throwable
Test publishing a resource with related resources with an iteration.

Throws:
Throwable - if something goes wrong

testPublishSiblings

public void testPublishSiblings()
                         throws Throwable
Tests the publishing of structure/shared properties.

take 2 siblings (s1 and s2): - change a individual property of s1 - change a shared property of s2 - direct publishing s2, should not change s1

Throws:
Throwable - if something goes wrong

testPublishStructureProperty

public void testPublishStructureProperty()
                                  throws Throwable
Tests the publishing of structure property.

take 2 siblings (s1 and s2): - change a individual property of s1 - s2 remains unchanged - direct publishing s1, should not change s2

Throws:
Throwable - if something goes wrong

testPublishTemporaryProject

public void testPublishTemporaryProject()
                                 throws Throwable
Test publishing a temporary project.

Throws:
Throwable - if something goes wrong