org.opencms.file
Class TestResourceOperations

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

public class TestResourceOperations
extends OpenCmsTestCase

Unit tests for basic resource operations without test import.


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
TestResourceOperations(String arg0)
          Default JUnit constructor.
 
Method Summary
static junit.framework.Test suite()
          Test suite for this test class.
 void testCreateAccessFolders()
          Test folder creation and reading with and without trailing "/".
 void testCreateReadFile()
          Tests the create and read file methods.
 void testCreateResources()
          Tests the "createResource" operation.
 void testCreateSibling()
          Tests the "createSibling" operation.
 void testGetFolderPath()
          Tests the static "getFolderPath" method.
 void testGetName()
          Tests the static "getName" method.
 void testGetParentFolder()
          Tests the static "getParentFolder" method.
 void testGetPathLevel()
          Tests the static "getPathLevel" method.
 void testGetPathPart()
          Tests the static "getPathPart" method.
 void testIsFolder()
          Tests the static "isFolder" method.
 void testPublishFile()
          Tests the publish resource method for file.
 void testResourceNames()
          Tests the check for valid resource names.
 
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

TestResourceOperations

public TestResourceOperations(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

testGetFolderPath

public void testGetFolderPath()
                       throws Throwable
Tests the static "getFolderPath" method.

Throws:
Throwable - if something goes wrong

testGetName

public void testGetName()
                 throws Throwable
Tests the static "getName" method.

Throws:
Throwable - if something goes wrong

testGetParentFolder

public void testGetParentFolder()
                         throws Throwable
Tests the static "getParentFolder" method.

Throws:
Throwable - if something goes wrong

testGetPathLevel

public void testGetPathLevel()
                      throws Throwable
Tests the static "getPathLevel" method.

Throws:
Throwable - if something goes wrong

testGetPathPart

public void testGetPathPart()
                     throws Throwable
Tests the static "getPathPart" method.

Throws:
Throwable - if something goes wrong

testIsFolder

public void testIsFolder()
                  throws Throwable
Tests the static "isFolder" method.

Throws:
Throwable - if something goes wrong

testResourceNames

public void testResourceNames()
                       throws Throwable
Tests the check for valid resource names.

Throws:
Throwable - if something goes wrong

testCreateResources

public void testCreateResources()
                         throws Throwable
Tests the "createResource" operation.

Throws:
Throwable - if something goes wrong

testCreateAccessFolders

public void testCreateAccessFolders()
                             throws Throwable
Test folder creation and reading with and without trailing "/".

Throws:
Throwable - if something goes wrong

testCreateReadFile

public void testCreateReadFile()
                        throws Throwable
Tests the create and read file methods.

Throws:
Throwable - if something goes wrong

testPublishFile

public void testPublishFile()
                     throws Throwable
Tests the publish resource method for file.

Throws:
Throwable - if something goes wrong

testCreateSibling

public void testCreateSibling()
                       throws Throwable
Tests the "createSibling" operation.

Throws:
Throwable - if something goes wrong