|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.TestPropertiesConfiguration
public class TestPropertiesConfiguration
Test for loading and saving properties files.
Constructor Summary | |
---|---|
TestPropertiesConfiguration()
|
Method Summary | |
---|---|
void |
setUp()
|
void |
testAppend()
Tests if properties can be appended by simply calling load() another time. |
void |
testAppendAndSave()
Tests appending a configuration to the test configuration. |
void |
testBackslashEscapingInLists()
Tests whether backslashes are correctly handled if lists are parsed. |
void |
testChangingDefaultListDelimiter()
|
void |
testChangingListDelimiter()
|
void |
testClone()
Tests whether a properties configuration can be successfully cloned. |
void |
testCloneNullLayout()
Tests the clone() method when no layout object exists yet. |
void |
testComment()
Test if the lines starting with # or ! |
void |
testCopyAndSave()
Tests copying another configuration into the test configuration. |
void |
testDisableListDelimiter()
|
void |
testEmpty()
Tests that empty properties are treated as the empty string (rather than as null). |
void |
testEscapedKey()
|
void |
testEscapedKeyValueSeparator()
Check that key/value separators can be part of a key. |
void |
testFileWithSharpSymbol()
Test the creation of a file containing a '#' in its name. |
void |
testGetIOFactoryDefault()
Tests whether a default IOFactory is set. |
void |
testGetLayout()
Tests accessing the layout object. |
void |
testGetStringWithEscapedChars()
|
void |
testGetStringWithEscapedComma()
|
void |
testIncludeInSubDir()
Tests including properties when they are loaded from a nested directory structure. |
void |
testInitFromNonExistingFile()
Tests initializing a properties configuration from a non existing file. |
void |
testInMemoryCreatedSave()
|
void |
testIsCommentLine()
Tests whether comment lines are correctly detected. |
void |
testKeepSeparators()
Tests that the property separators are retained when saving the configuration. |
void |
testKeyValueSeparators()
Test all acceptable key/value separators ('=', ':' or white spaces). |
void |
testLineSeparator()
Tests whether the correct line separator is used. |
void |
testList()
Tests List parsing. |
void |
testLoad()
|
void |
testLoadFromFile()
|
void |
testLoadInclude()
test if includes properties get loaded too |
void |
testLoadIncludeFromClassPath()
Tests if included files are loaded when the source lies in the class path. |
void |
testLoadIncludeInterpol()
test if includes properties from interpolated file name get loaded |
void |
testLoadUnexistingFile()
|
void |
testLoadViaProperty()
|
void |
testLoadViaPropertyWithBasePath()
|
void |
testLoadViaPropertyWithBasePath2()
|
void |
testLoadWithAutoSave()
Tests to load a file with enabled auto save mode. |
void |
testLoadWithAutoSaveAndAdd()
Tests the auto save functionality when a new property is added using the addProperty() method. |
void |
testLoadWithAutoSaveAndClear()
Tests the auto save functionality when a property is removed. |
void |
testLoadWithAutoSaveAndSetExisting()
Tests the auto save functionality when an existing property is modified. |
void |
testLoadWithAutoSaveAndSetNew()
Tests the auto save functionality when a new property is added using the setProperty() method. |
void |
testLoadWithDefaultEncoding()
Tests whether the correct default encoding is used when loading a properties file. |
void |
testMixedArray()
|
void |
testMultilines()
|
void |
testNewLineEscaping()
Tests escaping of an end of line with a backslash. |
void |
testPropertyLoaded()
Tests the propertyLoaded() method for a simple property. |
void |
testPropertyLoadedInclude()
Tests the propertyLoaded() method for an include property. |
void |
testPropertyLoadedIncludeNotAllowed()
Tests propertyLoaded() for an include property, when includes are disabled. |
void |
testReentrantReload()
Tests what happens if a reloading strategy's reloadingRequired()
implementation accesses methods of the configuration that in turn cause a reload. |
void |
testReference()
Tests that references to other properties work |
void |
testSave()
|
void |
testSaveEscapedEscapingCharacter()
Tests whether the escape character for list delimiters can be itself escaped and survives a save operation. |
void |
testSaveMissingFilename()
|
void |
testSaveToCustomURL()
|
void |
testSaveToHTTPServerFail()
Tests saving a file-based configuration to a HTTP server when the server reports a failure. |
void |
testSaveToHTTPServerSuccess()
Tests saving a file-based configuration to a HTTP server. |
void |
testSaveWithBasePath()
Tests if the base path is taken into account by the save() method. |
void |
testSaveWithDataConfig()
Tests adding properties through a DataConfiguration. |
void |
testSaveWithDelimiterParsingDisabled()
Tests saving a configuration when delimiter parsing is disabled. |
void |
testSetInclude()
|
void |
testSetIOFactoryNull()
Tests setting the IOFactory to null. |
void |
testSetIOFactoryReader()
Tests setting an IOFactory that uses a specialized reader. |
void |
testSetIOFactoryWriter()
Tests setting an IOFactory that uses a specialized writer. |
void |
testSetPropertyListWithDelimiterParsingDisabled()
Tests whether a list property is handled correctly if delimiter parsing is disabled. |
void |
testSlashEscaping()
Tests whether properties with slashes in their values can be saved. |
void |
testUnescapeJava()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestPropertiesConfiguration()
Method Detail |
---|
public void setUp() throws Exception
Exception
public void testLoad() throws Exception
Exception
public void testAppend() throws Exception
Exception
public void testEmpty() throws Exception
Exception
public void testReference() throws Exception
Exception
public void testLoadInclude() throws Exception
Exception
public void testLoadIncludeInterpol() throws Exception
Exception
public void testSetInclude() throws Exception
Exception
public void testList() throws Exception
List
parsing.
Exception
public void testSave() throws Exception
Exception
public void testSaveToCustomURL() throws Exception
Exception
public void testInMemoryCreatedSave() throws Exception
Exception
public void testSaveWithDelimiterParsingDisabled() throws ConfigurationException
ConfigurationException
public void testSaveMissingFilename() throws ConfigurationException
ConfigurationException
public void testSaveWithBasePath() throws Exception
Exception
- if an error occurspublic void testSaveEscapedEscapingCharacter() throws ConfigurationException
ConfigurationException
public void testLoadViaProperty() throws Exception
Exception
public void testLoadViaPropertyWithBasePath() throws Exception
Exception
public void testLoadViaPropertyWithBasePath2() throws Exception
Exception
public void testLoadFromFile() throws Exception
Exception
public void testLoadUnexistingFile() throws ConfigurationException
ConfigurationException
public void testLoadWithAutoSave() throws Exception
Exception
public void testLoadWithAutoSaveAndSetExisting() throws Exception
Exception
public void testLoadWithAutoSaveAndSetNew() throws Exception
Exception
public void testLoadWithAutoSaveAndAdd() throws Exception
Exception
public void testLoadWithAutoSaveAndClear() throws Exception
Exception
public void testGetStringWithEscapedChars()
public void testGetStringWithEscapedComma()
public void testUnescapeJava()
public void testEscapedKey() throws Exception
Exception
public void testMixedArray()
public void testMultilines()
public void testChangingDefaultListDelimiter() throws Exception
Exception
public void testChangingListDelimiter() throws Exception
Exception
public void testDisableListDelimiter() throws Exception
Exception
public void testNewLineEscaping()
public void testLoadIncludeFromClassPath() throws ConfigurationException
ConfigurationException
public void testComment()
public void testEscapedKeyValueSeparator()
public void testKeyValueSeparators()
public void testIncludeInSubDir() throws ConfigurationException
ConfigurationException
public void testLineSeparator() throws ConfigurationException
ConfigurationException
public void testReentrantReload()
reloadingRequired()
implementation accesses methods of the configuration that in turn cause a reload.
public void testGetLayout()
public void testPropertyLoaded() throws ConfigurationException
ConfigurationException
public void testPropertyLoadedInclude() throws ConfigurationException
ConfigurationException
public void testPropertyLoadedIncludeNotAllowed() throws ConfigurationException
ConfigurationException
public void testIsCommentLine()
public void testClone() throws ConfigurationException
ConfigurationException
public void testCloneNullLayout()
public void testSaveToHTTPServerSuccess() throws Exception
Exception
public void testSaveToHTTPServerFail() throws Exception
Exception
public void testFileWithSharpSymbol() throws Exception
Exception
public void testInitFromNonExistingFile() throws ConfigurationException
ConfigurationException
public void testCopyAndSave() throws ConfigurationException
ConfigurationException
public void testAppendAndSave() throws ConfigurationException
ConfigurationException
public void testSaveWithDataConfig() throws ConfigurationException
ConfigurationException
public void testLoadWithDefaultEncoding() throws ConfigurationException
ConfigurationException
public void testGetIOFactoryDefault()
public void testSetIOFactoryNull()
public void testSetIOFactoryReader() throws ConfigurationException
ConfigurationException
public void testSetIOFactoryWriter() throws ConfigurationException, IOException
ConfigurationException
IOException
public void testKeepSeparators() throws ConfigurationException, IOException
ConfigurationException
IOException
public void testSlashEscaping() throws ConfigurationException
ConfigurationException
public void testBackslashEscapingInLists() throws Exception
Exception
public void testSetPropertyListWithDelimiterParsingDisabled() throws ConfigurationException
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |