|
||||||||
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.ade.configuration.TestLiveConfig
public class TestLiveConfig
Tests for the ADE configuration mechanism which read the configuration data from multiple files in the VFS.
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 | |
---|---|
TestLiveConfig(String name)
Test constructor. |
Method Summary | ||
---|---|---|
protected void |
checkResourceTypes(CmsObject cms,
String path,
String attr,
String... expected)
Helper method to compare attributes of configured resource types with a list of expected values. |
|
protected void |
delete(CmsResource res)
Helper method for deleting a resource. |
|
protected String |
getAttribute(CmsResourceTypeConfig typeConfig,
String attr)
Gets an attribute from a resource type configuration object. |
|
protected
|
list(X... elems)
Helper method for creating a list of given elements. |
|
protected CmsObject |
onlineCms()
Helper method for creating a CMS context in the Online Project. |
|
protected void |
publish()
Helper method for publishing the current project. |
|
protected void |
restoreFiles()
Helper method to re-create the original test data in the VFS. |
|
protected CmsObject |
rootCms()
Helper method for getting a CMS object in the root site. |
|
static junit.framework.Test |
suite()
Returns the test suite. |
|
void |
testDeleted()
Tests deletion of configuration files. |
|
void |
testDetailPage1()
Tests finding detail pages. |
|
void |
testFormatters()
Tests formatter configuration. |
|
void |
testLevel1Configuration()
Tests the configuration in top-level sitemaps. |
|
void |
testLevel2Configuration()
Tests the configuration in level 2 subsitemaps. |
|
void |
testModuleConfig1()
Tests that newly created module configurations are reflected in the configuration objects. |
|
void |
testMove1()
Tests that when moving a configuration file, the configuration will be correct. |
|
void |
testMoveDetailPages()
Tests that when detail pages are moved, the configuration will still return the correct URIs. |
|
void |
testNoConfiguration()
Tests that the configuration is empty at paths where no configuration is defined. |
|
void |
testPublish()
Tests that publishing a changed configuration file updates the online configuration object. |
|
void |
testPublishDeleted()
Tests that publishing a deleted configuration file changes the online configuration. |
|
void |
testSaveDetailPages()
Tests the saving of detail pages. |
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 TestLiveConfig(String name)
name
- the name of the testMethod Detail |
---|
public static junit.framework.Test suite()
public void testDeleted() throws Exception
Exception
public void testDetailPage1() throws Exception
Exception
public void testFormatters() throws Exception
Exception
public void testLevel1Configuration() throws Exception
Exception
public void testLevel2Configuration() throws Exception
Exception
public void testModuleConfig1() throws Exception
Exception
public void testMove1() throws Exception
Exception
public void testMoveDetailPages() throws Exception
Exception
public void testNoConfiguration() throws Exception
Exception
public void testPublish() throws Exception
Exception
public void testPublishDeleted() throws Exception
Exception
public void testSaveDetailPages() throws Exception
Exception
protected void checkResourceTypes(CmsObject cms, String path, String attr, String... expected)
cms
- the CMS contextpath
- the path used to access the configurationattr
- the attribute which should be retrieved from the configured resource typesexpected
- protected void delete(CmsResource res) throws Exception
res
- the resource to delete
Exception
- if something goes wrongprotected String getAttribute(CmsResourceTypeConfig typeConfig, String attr)
typeConfig
- the type configuration objectattr
- the attribute name
protected <X> List<X> list(X... elems)
elems
- the elements
protected CmsObject onlineCms() throws Exception
Exception
protected void publish() throws Exception
Exception
protected void restoreFiles() throws Exception
Exception
protected CmsObject rootCms() throws CmsException
CmsException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |