|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.TestFileConfiguration
public class TestFileConfiguration
Field Summary | |
---|---|
org.junit.rules.TemporaryFolder |
folder
Helper object for managing temporary files. |
Constructor Summary | |
---|---|
TestFileConfiguration()
|
Method Summary | |
---|---|
void |
setUp()
Initializes the test environment. |
protected void |
tearDown()
Performs cleanup after a test case. |
void |
testClone()
Tests cloning a file based configuration. |
void |
testCreateFile1()
|
void |
testCreateFile2()
|
void |
testCreateFile3()
|
void |
testFileOverwrite()
Tests if the URL used by the load() method is also used by save(). |
void |
testGetFile()
Tests the getFile() method. |
void |
testGetFileAfterLoad()
Tests whether getFile() returns a valid file after a configuration has been loaded. |
void |
testInitFromClassPath()
Tests whether the constructor behaves the same as setFileName() when the configuration source is in the classpath. |
void |
testIterationWithReloadFlat()
Tests iterating over the keys of a non hierarchical file-based configuration while a reload happens. |
void |
testIterationWithReloadHierarchical()
Tests iterating over the keys of a hierarchical file-based configuration while a reload happens. |
void |
testLoadDirectoryConstrFile()
Tests that it is not possible to load a directory using the File constructor. |
void |
testLoadDirectoryConstrString()
Tests that it is not possible to load a directory using the String constructor. |
void |
testLoadDirectoryFile()
Tests that it is not possible to load a directory using the load() method which expects a File. |
void |
testLoadDirectoryString()
Checks that loading a directory instead of a file throws an exception. |
void |
testLoadFromClassPath()
Tests the loading of configuration file in a Combined configuration when the configuration source is in the classpath. |
void |
testLoadMultiple()
Tests whether calling load() multiple times changes the source. |
void |
testLocations()
|
void |
testLogErrorListener()
Tests whether an error log listener was registered at the configuration. |
void |
testPathWithPlus()
Tests whether file names containing a "+" character are handled correctly. |
void |
testPathWithSpaces()
Tests loading and saving a configuration file with a complicated path name including spaces. |
void |
testRefresh()
Tests whether a configuration can be refreshed. |
void |
testRefreshNoFile()
Tests refresh if the configuration is not associated with a file. |
void |
testReloadError()
Tests handling of errors in the reload() method. |
void |
testReloadingWithAutoSave()
Tests setting a file changed reloading strategy together with the auto save feature. |
void |
testSaveInvalidURL()
Tests if invalid URLs cause an exception. |
void |
testSaveInvalidURLString()
Tests if an invalid URL string causes an exception. |
void |
testSaveWithoutFileNameFile()
|
void |
testSaveWithoutFileNameURL()
|
void |
testSetURL()
|
void |
testSetURLWithParams()
|
void |
testWithConfigurationFactory()
Tests collaboration with ConfigurationFactory: Is the base path set on loading is valid in file based configurations? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public org.junit.rules.TemporaryFolder folder
Constructor Detail |
---|
public TestFileConfiguration()
Method Detail |
---|
public void setUp() throws Exception
Exception
protected void tearDown() throws Exception
Exception
public void testSetURL() throws Exception
Exception
public void testSetURLWithParams() throws Exception
Exception
public void testLocations() throws Exception
Exception
public void testCreateFile1() throws Exception
Exception
public void testCreateFile2() throws Exception
Exception
public void testCreateFile3() throws Exception
Exception
public void testWithConfigurationFactory() throws Exception
Exception
- if an error occurspublic void testSaveInvalidURL() throws Exception
Exception
public void testSaveInvalidURLString() throws ConfigurationException
ConfigurationException
public void testFileOverwrite() throws Exception
Exception
public void testReloadingWithAutoSave() throws Exception
Exception
public void testPathWithSpaces() throws Exception
Exception
public void testPathWithPlus() throws ConfigurationException, IOException
ConfigurationException
IOException
public void testGetFile() throws ConfigurationException
ConfigurationException
public void testGetFileAfterLoad() throws ConfigurationException, IOException
ConfigurationException
IOException
public void testLoadMultiple() throws ConfigurationException
ConfigurationException
public void testSaveWithoutFileNameFile() throws Exception
Exception
public void testSaveWithoutFileNameURL() throws Exception
Exception
public void testLoadDirectoryString() throws ConfigurationException
ConfigurationException
public void testLoadDirectoryFile() throws ConfigurationException
ConfigurationException
public void testLoadDirectoryConstrString() throws ConfigurationException
ConfigurationException
public void testLoadDirectoryConstrFile() throws ConfigurationException
ConfigurationException
public void testInitFromClassPath() throws ConfigurationException
ConfigurationException
public void testLoadFromClassPath() throws ConfigurationException
ConfigurationException
public void testClone() throws ConfigurationException
ConfigurationException
public void testLogErrorListener()
public void testReloadError() throws ConfigurationException
ConfigurationException
public void testIterationWithReloadFlat() throws ConfigurationException
ConfigurationException
public void testIterationWithReloadHierarchical() throws ConfigurationException
ConfigurationException
public void testRefresh() throws ConfigurationException
ConfigurationException
public void testRefreshNoFile() throws ConfigurationException
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |