org.opencms.xml.content
Class TestCmsXmlContentWithVfs

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.opencms.test.OpenCmsTestCase
              extended by org.opencms.xml.content.TestCmsXmlContentWithVfs
All Implemented Interfaces:
junit.framework.Test

public class TestCmsXmlContentWithVfs
extends OpenCmsTestCase

Tests the OpenCms XML contents with real VFS operations.


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
TestCmsXmlContentWithVfs(String arg0)
          Default JUnit constructor.
 
Method Summary
static junit.framework.Test suite()
          Test suite for this test class.
 void testAccessNestedElements()
          Test accessing elements in nested schemas.
 void testAddFileReference()
          Test adding a file reference value to an existing xmlcontent.
 void testAddRemoveElements()
          Test adding and removing elements from an XML content.
 void testAddRemoveNestedElements()
          Test adding and removing elements from an XML content, including nested elements.
 void testAutoXsd()
          Tests creation of the automatic XML schema XSD.
 void testContentHandler()
          Test using a different XML content handler then the default handler.
 void testCopyMoveRemoveLocale()
          Tests locale copy, move and remove operation on an XML content.
 void testDefaultNested()
          Test default values in the appinfo node using a nested XML content schema.
 void testDefaultOnCreation()
          Test default values after a new XML content has been created.
 void testDefaultOnCreationWithNested()
          Test default values in the appinfo node using a nested XML content schema when creating a new content.
 void testEmptyLocale()
          Tests the Locale settings of XMLContents with only optional elements and no element present.
 void testLayoutWidgetMapping()
          Test using the GUI widget mapping appinfo nodes.
 void testLinkResolver()
          Test resolving the links from an XML content.
 void testMacros()
          Tests the macros in messages and default values.
 void testMappings()
          Tests the element mappings from the appinfo node.
 void testMappingsAsList()
          Tests element mappings fom XML content to a property list.
 void testMappingsOfNestedContent()
          Tests the element mappings from the appinfo node for nested XML content.
 void testMappingsWithManyLocales()
          Tests the element mappings from the appinfo node if there is more then one locale.
 void testNestedSchema()
          Test using a nested XML content schema.
 void testResourceBundle()
          Test if the resource bundle in the schema definition is properly initialized.
 void testResourceBundleFromXml()
          Test the resource bundles defined in XML content.
 void testResourceBundleFromXmlWithDefault()
          Test the resource bundles defined in XML content with default values.
 void testResourceMultiBundle()
          Test if a multiple resource bundle in the schema definition is properly initialized.
 void testValidation()
          Test the validation of the value elements.
 void testValidationExtended()
          Extended test for the validation of the value elements.
 void testValidationLocale()
          Test for the validation with different locales.
 void testValueIndex()
          Test the index of the value elements.
 void testVarLinkResolver()
          Test resolving a CmsXmlVarLinkValue in an XML content.
 void testXmlContentCreate()
          Tests creating a XMl page with the API.
 
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

TestCmsXmlContentWithVfs

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

testAccessNestedElements

public void testAccessNestedElements()
                              throws Exception
Test accessing elements in nested schemas.

Throws:
Exception - in case something goes wrong

testAddFileReference

public void testAddFileReference()
                          throws Exception
Test adding a file reference value to an existing xmlcontent.

Throws:
Exception - in case something goes wrong

testAddRemoveElements

public void testAddRemoveElements()
                           throws Exception
Test adding and removing elements from an XML content.

Throws:
Exception - in case something goes wrong

testAddRemoveNestedElements

public void testAddRemoveNestedElements()
                                 throws Exception
Test adding and removing elements from an XML content, including nested elements.

Throws:
Exception - in case something goes wrong

testAutoXsd

public void testAutoXsd()
                 throws Exception
Tests creation of the automatic XML schema XSD.

Throws:
Exception - in case something goes wrong

testContentHandler

public void testContentHandler()
                        throws Exception
Test using a different XML content handler then the default handler.

Throws:
Exception - in case something goes wrong

testCopyMoveRemoveLocale

public void testCopyMoveRemoveLocale()
                              throws Exception
Tests locale copy, move and remove operation on an XML content.

Throws:
Exception - if the test fails

testDefaultNested

public void testDefaultNested()
                       throws Exception
Test default values in the appinfo node using a nested XML content schema.

Throws:
Exception - in case something goes wrong

testDefaultOnCreation

public void testDefaultOnCreation()
                           throws Exception
Test default values after a new XML content has been created.

Throws:
Exception - in case the test fails

testDefaultOnCreationWithNested

public void testDefaultOnCreationWithNested()
                                     throws Exception
Test default values in the appinfo node using a nested XML content schema when creating a new content.

The nested content definition must be non-optional, and must have non-optional element.

Throws:
Exception - in case something goes wrong

testEmptyLocale

public void testEmptyLocale()
                     throws Exception
Tests the Locale settings of XMLContents with only optional elements and no element present.

Throws:
Exception - if the test fails

testLayoutWidgetMapping

public void testLayoutWidgetMapping()
                             throws Exception
Test using the GUI widget mapping appinfo nodes.

Throws:
Exception - in case something goes wrong

testLinkResolver

public void testLinkResolver()
                      throws Exception
Test resolving the links from an XML content.

Throws:
Exception - in case something goes wrong

testVarLinkResolver

public void testVarLinkResolver()
                         throws Exception
Test resolving a CmsXmlVarLinkValue in an XML content.

Throws:
Exception - in case something goes wrong

testMacros

public void testMacros()
                throws Exception
Tests the macros in messages and default values.

Throws:
Exception - in case something goes wrong

testMappings

public void testMappings()
                  throws Exception
Tests the element mappings from the appinfo node.

Throws:
Exception - in case something goes wrong

testMappingsAsList

public void testMappingsAsList()
                        throws Exception
Tests element mappings fom XML content to a property list.

Throws:
Exception - if the test fails

testMappingsOfNestedContent

public void testMappingsOfNestedContent()
                                 throws Exception
Tests the element mappings from the appinfo node for nested XML content.

Throws:
Exception - in case something goes wrong

testMappingsWithManyLocales

public void testMappingsWithManyLocales()
                                 throws Exception
Tests the element mappings from the appinfo node if there is more then one locale.

Throws:
Exception - in case something goes wrong

testNestedSchema

public void testNestedSchema()
                      throws Exception
Test using a nested XML content schema.

Throws:
Exception - in case something goes wrong

testResourceBundle

public void testResourceBundle()
                        throws Exception
Test if the resource bundle in the schema definition is properly initialized.

Throws:
Exception - in case something goes wrong

testResourceMultiBundle

public void testResourceMultiBundle()
                             throws Exception
Test if a multiple resource bundle in the schema definition is properly initialized.

Throws:
Exception - in case something goes wrong

testResourceBundleFromXml

public void testResourceBundleFromXml()
                               throws Exception
Test the resource bundles defined in XML content.

Throws:
Exception - in case something goes wrong

testResourceBundleFromXmlWithDefault

public void testResourceBundleFromXmlWithDefault()
                                          throws Exception
Test the resource bundles defined in XML content with default values.

Throws:
Exception - in case something goes wrong

testValidation

public void testValidation()
                    throws Exception
Test the validation of the value elements.

Throws:
Exception - in case something goes wrong

testValidationExtended

public void testValidationExtended()
                            throws Exception
Extended test for the validation of the value elements.

Throws:
Exception - in case something goes wrong

testValidationLocale

public void testValidationLocale()
                          throws Exception
Test for the validation with different locales.

Throws:
Exception - in case something goes wrong

testValueIndex

public void testValueIndex()
                    throws Exception
Test the index of the value elements.

Throws:
Exception - in case something goes wrong

testXmlContentCreate

public void testXmlContentCreate()
                          throws Exception
Tests creating a XMl page with the API.

Throws:
Exception - in case something goes wrong