|
||||||||
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.TestConfig
public class TestConfig
Lightweight tests for the ADE configuration mechanism which mostly do not read the configuration data from the VFS.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.opencms.test.OpenCmsTestCase |
---|
OpenCmsTestCase.ConnectionData |
Field Summary | |
---|---|
protected static List<CmsDetailPageInfo> |
NO_DETAILPAGES
Empty detail page list. |
protected static List<CmsModelPageConfig> |
NO_MODEL_PAGES
Empty model page list. |
protected static List<CmsPropertyConfig> |
NO_PROPERTIES
Empty property definition list. |
protected static List<CmsResourceTypeConfig> |
NO_TYPES
Empty resource type list. |
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 | |
---|---|
TestConfig(String arg0)
Test constructor. |
Method Summary | ||
---|---|---|
protected void |
assertPathEquals(String path1,
String path2)
Helper method for comparing paths which ignores leading/trailing slashes. |
|
protected CmsPropertyConfig |
createDisabledPropertyConfig(String name)
Helper method for creating a disabled property configuration. |
|
void |
createFolder(String rootPath,
boolean deep)
Helper method for creating a folder. |
|
protected CmsPropertyConfig |
createPropertyConfig(String name,
String description)
Helper method for creating a property configuration object. |
|
protected CmsXmlContentProperty |
createXmlContentProperty(String name,
String description)
Helper method for creating an XML content property with only a name and description. |
|
protected void |
dumpTree()
Helper method for dumping the whole VFS tree to the console. |
|
protected void |
dumpTree(CmsObject cms,
CmsResource res,
int indentation)
Helper method for dumping a VFS tree to the console. |
|
protected CmsUUID |
getId(String rootPath)
Helper method for getting the structure id of a file given by root path. |
|
protected
|
list(X... elems)
Helper method for creating a list of elements. |
|
protected CmsObject |
rootCms()
Helper method for getting a CMS context in the root site |
|
protected
|
set(X... elems)
Helper method for creating a set of elements. |
|
static junit.framework.Test |
suite()
Returns the test suite. |
|
void |
testCreatable()
Tests the 'creatable' check of the CmsResourceTypeConfig class. |
|
void |
testCreateContentsLocally()
Tests the option to create contents locally. |
|
void |
testCreateContentsLocally2()
Another test for the option to create contents locally. |
|
void |
testCreateContentsLocally3()
Another test for the option to create contents locally. |
|
void |
testCreateContentsLocally4()
Tests the creation of local contents when no folder name has been defined anywhere. |
|
void |
testCreateElements()
Tests the creation of new contents by the CmsResourceTypeConfig class. |
|
void |
testDefaultFolderName()
Tests the generation of the default content folder name. |
|
void |
testDefaultFolderName2()
Another test for the the generation of the content folder name. |
|
void |
testDetailPages2()
Tests inheritance of detail page configurations. |
|
void |
testDiscardInheritedModelPages()
Tests the 'Disable all' option for model pages. |
|
void |
testDiscardInheritedProperties()
Tests the 'Disable all' option for properties |
|
void |
testDiscardInheritedTypes()
Tests the 'Disable all' option for resource types. |
|
void |
testInheritedFolderName1()
Tests inheritance of folder names for resource types. |
|
void |
testInheritedFolderName2()
Tests inheritance of folder names for resource types. |
|
void |
testInheritNamePattern()
Tests inheritance of name patterns for resource types. |
|
void |
testInheritProperties()
Tests inheritance of property definitions. |
|
void |
testInheritResourceTypes1()
Tests inheritance of resource types. |
|
void |
testModelPages1()
Tests inheritance of model pages. |
|
void |
testModelPages2()
Tests inheritance of model pages. |
|
void |
testOverrideResourceType()
Tests overriding of resource types. |
|
void |
testParseConfiguration()
Tests the configuration parser. |
|
void |
testParseModuleConfiguration()
Tests the parsing of module configurations. |
|
void |
testRemoveResourceType()
Test for disabling single resource types. |
|
void |
testReorderResourceTypes()
Test for reordering resource types. |
|
void |
testResolveFolderName1()
Tests folder name generation. |
|
void |
testResourceTypeConfigObjectsNotSame()
Tests that for each configuration file there are distinct resource type configuration objects. |
|
void |
testXsdFormatters1()
Tests accessing the XSD formatter configuration. |
|
protected void |
writeIndentation(int indent)
Helper method for writing a number of spaces. |
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 |
Field Detail |
---|
protected static final List<CmsDetailPageInfo> NO_DETAILPAGES
protected static final List<CmsModelPageConfig> NO_MODEL_PAGES
protected static final List<CmsPropertyConfig> NO_PROPERTIES
protected static final List<CmsResourceTypeConfig> NO_TYPES
Constructor Detail |
---|
public TestConfig(String arg0)
arg0
- Method Detail |
---|
public static junit.framework.Test suite()
public void createFolder(String rootPath, boolean deep) throws CmsException
rootPath
- the root path of the folderdeep
- if true, creates all parent folders
CmsException
- if something goes wrongpublic void testCreatable() throws Exception
Exception
public void testCreateContentsLocally() throws Exception
Exception
public void testCreateContentsLocally2() throws Exception
Exception
public void testCreateContentsLocally3() throws Exception
Exception
public void testCreateContentsLocally4() throws Exception
Exception
public void testCreateElements() throws Exception
Exception
public void testDefaultFolderName() throws Exception
Exception
public void testDefaultFolderName2() throws Exception
Exception
public void testDetailPages2() throws Exception
Exception
public void testDiscardInheritedModelPages() throws Exception
Exception
public void testDiscardInheritedProperties() throws Exception
Exception
public void testDiscardInheritedTypes() throws Exception
Exception
public void testInheritedFolderName1() throws Exception
Exception
public void testInheritedFolderName2() throws Exception
Exception
public void testInheritNamePattern() throws Exception
Exception
public void testInheritProperties() throws Exception
Exception
public void testInheritResourceTypes1() throws Exception
Exception
public void testModelPages1() throws Exception
Exception
public void testModelPages2() throws Exception
Exception
public void testOverrideResourceType() throws Exception
Exception
public void testParseConfiguration() throws Exception
Exception
public void testParseModuleConfiguration() throws Exception
Exception
public void testRemoveResourceType() throws Exception
Exception
public void testReorderResourceTypes() throws Exception
Exception
public void testResolveFolderName1() throws Exception
Exception
public void testResourceTypeConfigObjectsNotSame() throws Exception
Exception
public void testXsdFormatters1() throws Exception
Exception
protected void assertPathEquals(String path1, String path2)
path1
- the first pathpath2
- the second pathprotected CmsPropertyConfig createDisabledPropertyConfig(String name)
name
- the property name
protected CmsPropertyConfig createPropertyConfig(String name, String description)
name
- the property namedescription
- the property description
protected CmsXmlContentProperty createXmlContentProperty(String name, String description)
name
- the property namedescription
- the property description
protected void dumpTree() throws CmsException
CmsException
protected void dumpTree(CmsObject cms, CmsResource res, int indentation) throws CmsException
cms
- the CMS contextres
- the root resourceindentation
- the initial indentation level
CmsException
- if something goes wrongprotected CmsUUID getId(String rootPath) throws CmsException
rootPath
- the file root path
CmsException
protected <X> List<X> list(X... elems)
elems
- the list elements
protected CmsObject rootCms() throws CmsException
CmsException
protected <X> Set<X> set(X... elems)
elems
- the elements
protected void writeIndentation(int indent)
indent
- the number of spaces to write
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |