|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.TestXMLConfiguration
public class TestXMLConfiguration
test for loading and saving xml properties files
Constructor Summary | |
---|---|
TestXMLConfiguration()
|
Method Summary | |
---|---|
void |
setUp()
|
void |
testAddAttribute()
|
void |
testAddList()
|
void |
testAddNodesAndSave()
Tests saving a configuration after a node was added. |
void |
testAddNodesAttributeNode()
Tests adding an attribute node using the addNodes() method. |
void |
testAddNodesCopy()
Tests adding nodes from another configuration. |
void |
testAddNodesToSubnodeConfiguration()
Tests whether it is possible to add nodes to a XMLConfiguration through a SubnodeConfiguration and whether these nodes have the correct type. |
void |
testAddObjectAttribute()
|
void |
testAddObjectProperty()
|
void |
testAddProperty()
|
void |
testAddPropertyListWithDelimiterParsingDisabled()
Tests whether list properties are added correctly if delimiter parsing is disabled. |
void |
testAppend()
Tests if a second file can be appended to a first. |
void |
testAttributeSplittingAndDelimiterParsingDisabled()
Tests disabling both delimiter parsing and attribute splitting. |
void |
testAttributeSplittingDisabled()
Tests whether attribute splitting can be disabled. |
void |
testAutoSave()
|
void |
testAutoSaveAddNodes()
Tests whether the addNodes() method triggers an auto save. |
void |
testAutoSaveWithReloadingStrategy()
Tests a combination of auto save = true and an associated reloading strategy. |
void |
testAutoSaveWithSubnodeConfig()
Tests whether the auto save mechanism is triggered by changes at a subnode configuration. |
void |
testAutoSaveWithSubSubnodeConfig()
Tests whether a subnode configuration created from another subnode configuration of a XMLConfiguration can trigger the auto save mechanism. |
void |
testClearAttribute()
|
void |
testClearProperty()
|
void |
testClearTextRootElement()
Tests removing the text of the root element. |
void |
testClone()
Tests the clone() method. |
void |
testCloneWithSave()
Tests saving a configuration after cloning to ensure that the clone and the original are completely detached. |
void |
testComplexNames()
Tests access to tag names with delimiter characters. |
void |
testConcurrentGetAndReload()
|
void |
testConfigurationAtWithReload()
Tests if reloads are recognized by configurationAt(). |
void |
testConfigurationsAtWithReload()
Tests if reloads are recognized by configurationsAt(). |
void |
testCopyRootName()
Tests whether the name of the root element is copied when a configuration is created using the copy constructor. |
void |
testCopyRootNameNoDocument()
Tests whether the name of the root element is copied for a configuration for which not yet a document exists. |
void |
testCustomDocBuilder()
Tests setting a custom document builder. |
void |
testCustomDocBuilderValidationError()
Tests whether a validating document builder detects a validation error. |
void |
testCustomDocBuilderValidationSuccess()
Tests whether a valid document can be loaded with a validating document builder. |
void |
testDelimiterParsingDisabled()
Tests string properties with list delimiters when delimiter parsing is disabled |
void |
testDelimiterParsingDisabledMultiAttrValues()
Tests multiple attribute values in delimiter parsing disabled mode. |
void |
testDtd()
Tests whether a DTD can be accessed. |
void |
testEmptyAttribute()
Tests whether an attribute can be set to an empty string. |
void |
testEmptyElements()
Tests handling of empty elements. |
void |
testEmptyReload()
Tests the isEmpty() method for an empty configuration that was reloaded. |
void |
testGetAttribute()
|
void |
testGetCommentedProperty()
|
void |
testGetComplexProperty()
|
void |
testGetKeysWithReload()
Tests whether reloads are recognized when querying the configuration's keys. |
void |
testgetProperty()
|
void |
testGetProperty()
|
void |
testGetPropertyWithXMLEntity()
|
void |
testGetRootReference()
Tests whether the configuration's root node is initialized with a reference to the corresponding XML element. |
void |
testInitCopy()
Tests the copy constructor. |
void |
testListWithAttributes()
Tests list nodes with multiple values and attributes. |
void |
testListWithAttributesMultiValue()
Tests a list node with attributes that has multiple values separated by the list delimiter. |
void |
testListWithMultiAttributesMultiValue()
Tests a list node with a multi-value attribute and multiple values. |
void |
testLoad()
|
void |
testLoadAndSaveFromFile()
Tests constructing an XMLConfiguration from a non existing file and later saving to this file. |
void |
testLoadFromStream()
Tests loading from a stream. |
void |
testLoadFromURL()
Tests loading a configuration from a URL. |
void |
testLoadInvalidXML()
Tests loading a non well formed XML from a string. |
void |
testLoadWithBasePath()
|
void |
testLoadWithEncoding()
Tests whether the encoding is correctly detected by the XML parser. |
void |
testMultipleAttrValuesEscaped()
Tests using multiple attribute values, which are partly escaped when delimiter parsing is not disabled. |
void |
testPreserveSpace()
Tests whether spaces are preserved when the xml:space attribute is set. |
void |
testPreserveSpaceInvalid()
Tests an xml:space attribute with an invalid value. |
void |
testPreserveSpaceOverride()
Tests whether the xml:space attribute can be overridden in nested elements. |
void |
testRefresh()
Tests the refresh() method. |
void |
testRefreshNoFile()
Tries to call refresh() when the configuration is not associated with a file. |
void |
testRegisterEntityId()
Tests registering the publicId of a DTD. |
void |
testRegisterEntityIdNull()
Tries to register a null public ID. |
void |
testReloading()
Tests collaboration between XMLConfiguration and a reloading strategy. |
void |
testReloadingOOM()
|
void |
testSave()
|
void |
testSaveAfterCreateWithCopyConstructor()
Tests saving a configuration that was created from a hierarchical configuration. |
void |
testSaveAttributes()
Tests saving attributes (related to issue 34442). |
void |
testSaveDelimiterParsingDisabled()
Tests saving and loading a configuration when delimiter parsing is disabled. |
void |
testSaveDelimiterParsingDisabledAttrs()
Tests saving and loading a configuration when delimiter parsing is disabled and attributes are involved. |
void |
testSaveToStream()
Tests saving to a stream. |
void |
testSaveToURL()
Tests saving to a URL. |
void |
testSaveWindowsPath()
Tests whether a windows path can be saved correctly. |
void |
testSaveWithDelimiterParsingDisabled()
Tests string properties with list delimiters when delimiter parsing is disabled |
void |
testSaveWithDoctype()
Tests whether the DOCTYPE survives a save operation. |
void |
testSaveWithDoctypeIDs()
Tests setting public and system IDs for the D'OCTYPE and then saving the configuration. |
void |
testSaveWithEncoding()
Tests whether the encoding is written to the generated XML file. |
void |
testSaveWithInvalidTransformerFactory()
Tests saving a configuration when an invalid transformer factory is specified. |
void |
testSaveWithNullEncoding()
Tests whether a default encoding is used if no specific encoding is set. |
void |
testSaveWithValidation()
Tests modifying an XML document and saving it with schema validation enabled. |
void |
testSaveWithValidationFailure()
Tests modifying an XML document and validating it against the schema. |
void |
testSetAttribute()
|
void |
testSetProperty()
|
void |
testSetPropertyListWithDelimiterParsingDisabled()
Tests whether list properties are set correctly if delimiter parsing is disabled. |
void |
testSetRootAttribute()
Tests setting an attribute on the root element. |
void |
testSetTextRootElement()
Tests setting text of the root element. |
void |
testSettingFileNames()
|
void |
testSplitLists()
Tests string properties with list delimiters and escaped delimiters. |
void |
testSubset()
Tests the subset() method. |
void |
testSubsetWithReload()
Tests if reloads are recognized by subset(). |
void |
testValidating()
Tests DTD validation using the setValidating() method. |
void |
testXPathExpressionEngine()
Tests accessing properties when the XPATH expression engine is set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestXMLConfiguration()
Method Detail |
---|
public void setUp() throws Exception
Exception
public void testGetProperty()
public void testGetCommentedProperty()
public void testGetPropertyWithXMLEntity()
public void testClearProperty() throws Exception
Exception
public void testgetProperty()
public void testGetAttribute()
public void testClearAttribute() throws Exception
Exception
public void testSetAttribute()
public void testAddAttribute()
public void testAddObjectAttribute()
public void testSetRootAttribute() throws ConfigurationException
ConfigurationException
public void testGetRootReference()
public void testAddList()
public void testGetComplexProperty()
public void testSettingFileNames()
public void testLoad() throws Exception
Exception
public void testLoadWithBasePath() throws Exception
Exception
public void testLoadAndSaveFromFile() throws Exception
Exception
public void testLoadFromURL() throws Exception
Exception
public void testLoadFromStream() throws Exception
Exception
public void testLoadInvalidXML() throws Exception
Exception
public void testSetProperty() throws Exception
Exception
public void testAddProperty()
public void testAddObjectProperty()
public void testSave() throws Exception
Exception
public void testSaveToURL() throws Exception
Exception
public void testSaveToStream() throws Exception
Exception
public void testAutoSave() throws Exception
Exception
public void testAppend() throws Exception
Exception
public void testSaveAttributes() throws Exception
Exception
public void testReloading() throws Exception
Exception
public void testReloadingOOM() throws Exception
Exception
public void testRefresh() throws ConfigurationException
ConfigurationException
public void testRefreshNoFile() throws ConfigurationException
ConfigurationException
public void testComplexNames()
public void testCustomDocBuilder() throws Exception
Exception
public void testCustomDocBuilderValidationError() throws Exception
Exception
public void testCustomDocBuilderValidationSuccess() throws Exception
Exception
public void testClone()
public void testCloneWithSave() throws ConfigurationException
ConfigurationException
public void testSubset() throws ConfigurationException
ConfigurationException
public void testSplitLists()
public void testDelimiterParsingDisabled() throws ConfigurationException
ConfigurationException
public void testSaveWithDelimiterParsingDisabled() throws ConfigurationException
ConfigurationException
public void testDtd() throws ConfigurationException
ConfigurationException
public void testValidating() throws ConfigurationException
ConfigurationException
public void testEmptyElements() throws ConfigurationException
ConfigurationException
public void testEmptyReload() throws ConfigurationException
ConfigurationException
public void testLoadWithEncoding() throws ConfigurationException
ConfigurationException
public void testSaveWithEncoding() throws ConfigurationException
ConfigurationException
public void testSaveWithNullEncoding() throws ConfigurationException
ConfigurationException
public void testSaveWithDoctype() throws ConfigurationException
ConfigurationException
public void testSaveWithDoctypeIDs() throws ConfigurationException
ConfigurationException
public void testSaveWithInvalidTransformerFactory()
public void testSubsetWithReload() throws ConfigurationException
ConfigurationException
public void testConfigurationAtWithReload() throws ConfigurationException
ConfigurationException
public void testConfigurationsAtWithReload() throws ConfigurationException
ConfigurationException
public void testGetKeysWithReload() throws ConfigurationException
ConfigurationException
public void testXPathExpressionEngine()
public void testInitCopy() throws ConfigurationException
ConfigurationException
public void testSetTextRootElement() throws ConfigurationException
ConfigurationException
public void testClearTextRootElement() throws ConfigurationException
ConfigurationException
public void testListWithAttributes()
public void testListWithAttributesMultiValue()
public void testListWithMultiAttributesMultiValue()
public void testAutoSaveWithSubnodeConfig() throws ConfigurationException
ConfigurationException
public void testAutoSaveWithSubSubnodeConfig() throws ConfigurationException
ConfigurationException
public void testSaveDelimiterParsingDisabled() throws ConfigurationException
ConfigurationException
public void testSaveDelimiterParsingDisabledAttrs() throws ConfigurationException
ConfigurationException
public void testDelimiterParsingDisabledMultiAttrValues() throws ConfigurationException
ConfigurationException
public void testMultipleAttrValuesEscaped() throws ConfigurationException
ConfigurationException
public void testAutoSaveWithReloadingStrategy() throws ConfigurationException
ConfigurationException
public void testAddNodesCopy() throws ConfigurationException
ConfigurationException
public void testAutoSaveAddNodes() throws ConfigurationException
ConfigurationException
public void testAddNodesAndSave() throws ConfigurationException
ConfigurationException
public void testRegisterEntityId() throws Exception
Exception
public void testRegisterEntityIdNull() throws IOException
IOException
public void testSaveAfterCreateWithCopyConstructor() throws ConfigurationException
ConfigurationException
public void testCopyRootName() throws ConfigurationException
ConfigurationException
public void testCopyRootNameNoDocument() throws ConfigurationException
ConfigurationException
public void testAddNodesAttributeNode()
public void testPreserveSpace()
public void testPreserveSpaceOverride()
public void testPreserveSpaceInvalid()
public void testAttributeSplittingDisabled() throws ConfigurationException
ConfigurationException
public void testAttributeSplittingAndDelimiterParsingDisabled() throws ConfigurationException
ConfigurationException
public void testSaveWithValidation() throws Exception
Exception
public void testSaveWithValidationFailure() throws Exception
Exception
public void testConcurrentGetAndReload() throws Exception
Exception
public void testSaveWindowsPath() throws ConfigurationException
ConfigurationException
public void testEmptyAttribute() throws ConfigurationException
ConfigurationException
public void testAddNodesToSubnodeConfiguration() throws Exception
Exception
public void testSetPropertyListWithDelimiterParsingDisabled() throws ConfigurationException
ConfigurationException
public void testAddPropertyListWithDelimiterParsingDisabled() throws ConfigurationException
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |