Java Doc for TestXMLConfiguration.java in  » Library » Apache-commons-configuration-1.4-src » org » apache » commons » configuration » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache commons configuration 1.4 src » org.apache.commons.configuration 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.commons.configuration.TestXMLConfiguration

TestXMLConfiguration
public class TestXMLConfiguration extends TestCase (Code)
test for loading and saving xml properties files
version:
   $Id: TestXMLConfiguration.java 513498 2007-03-01 21:15:07Z oheger $


Field Summary
final static  StringDOCTYPE
     Constant for the DOCTYPE prefix.
final static  StringDOCTYPE_DECL
     Constant for the DOCTYPE declaration.
final static  StringENCODING
     Constant for the used encoding.
final static  StringPROP_FACTORY
     Constant for the transformer factory property.
final static  StringPUBLIC_ID
     Constant for the test public ID.
final static  StringSYSTEM_ID
     Constant for the test system ID.


Method Summary
protected  voidsetUp()
    
public  voidtestAddAttribute()
    
public  voidtestAddList()
    
public  voidtestAddObjectAttribute()
    
public  voidtestAddObjectProperty()
    
public  voidtestAddProperty()
    
public  voidtestAppend()
     Tests if a second file can be appended to a first.
public  voidtestAutoSave()
    
public  voidtestClearAttribute()
    
public  voidtestClearProperty()
    
public  voidtestClone()
     Tests the clone() method.
public  voidtestCloneWithSave()
     Tests saving a configuration after cloning to ensure that the clone and the original are completely detachted.
public  voidtestComplexNames()
     Tests access to tag names with delimiter characters.
public  voidtestConfigurationAtWithReload()
     Tests if reloads are recognized by configurationAt().
public  voidtestConfigurationsAtWithReload()
     Tests if reloads are recognized by configurationsAt().
public  voidtestCustomDocBuilder()
     Tests setting a custom document builder.
public  voidtestDelimiterParsingDisabled()
    
public  voidtestDtd()
     Tests whether a DTD can be accessed.
public  voidtestEmptyElements()
     Tests handling of empty elements.
public  voidtestGetAttribute()
    
public  voidtestGetCommentedProperty()
    
public  voidtestGetComplexProperty()
    
public  voidtestGetProperty()
    
public  voidtestGetPropertyWithXMLEntity()
    
public  voidtestInitCopy()
     Tests the copy constructor.
public  voidtestLoad()
    
public  voidtestLoadAndSaveFromFile()
     Tests constructing an XMLConfiguration from a non existing file and later saving to this file.
public  voidtestLoadFromStream()
     Tests loading from a stream.
public  voidtestLoadFromURL()
     Tests loading a configuration from a URL.
public  voidtestLoadInvalidXML()
     Tests loading a non well formed XML from a string.
public  voidtestLoadWithBasePath()
    
public  voidtestLoadWithEncoding()
     Tests whether the encoding is correctly detected by the XML parser.
public  voidtestReloading()
     Tests collaboration between XMLConfiguration and a reloading strategy.
public  voidtestSave()
    
public  voidtestSaveAttributes()
     Tests saving attributes (related to issue 34442).
public  voidtestSaveToStream()
     Tests saving to a stream.
public  voidtestSaveToURL()
     Tests saving to a URL.
public  voidtestSaveWithDoctype()
     Tests whether the DOCTYPE survives a save operation.
public  voidtestSaveWithDoctypeIDs()
     Tests setting public and system IDs for the D'OCTYPE and then saving the configuration.
public  voidtestSaveWithEncoding()
     Tests whether the encoding is written to the generated XML file.
public  voidtestSaveWithInvalidTransformerFactory()
     Tests saving a configuration when an invalid transformer factory is specified.
public  voidtestSaveWithNullEncoding()
     Tests whether a default encoding is used if no specific encoding is set.
public  voidtestSetAttribute()
    
public  voidtestSetProperty()
    
public  voidtestSettingFileNames()
    
public  voidtestSplitLists()
     Tests string properties with list delimiters and escaped delimiters.
public  voidtestSubset()
     Tests the subset() method.
public  voidtestSubsetWithReload()
     Tests if reloads are recognized by subset().
public  voidtestValidating()
     Tests DTD validation using the setValidating() method.
public  voidtestXPathExpressionEngine()
     Tests accessing properties when the XPATH expression engine is set.
public  voidtestgetProperty()
    

Field Detail
DOCTYPE
final static String DOCTYPE(Code)
Constant for the DOCTYPE prefix.



DOCTYPE_DECL
final static String DOCTYPE_DECL(Code)
Constant for the DOCTYPE declaration.



ENCODING
final static String ENCODING(Code)
Constant for the used encoding.



PROP_FACTORY
final static String PROP_FACTORY(Code)
Constant for the transformer factory property.



PUBLIC_ID
final static String PUBLIC_ID(Code)
Constant for the test public ID.



SYSTEM_ID
final static String SYSTEM_ID(Code)
Constant for the test system ID.





Method Detail
setUp
protected void setUp() throws Exception(Code)



testAddAttribute
public void testAddAttribute()(Code)



testAddList
public void testAddList()(Code)



testAddObjectAttribute
public void testAddObjectAttribute()(Code)



testAddObjectProperty
public void testAddObjectProperty()(Code)



testAddProperty
public void testAddProperty()(Code)



testAppend
public void testAppend() throws Exception(Code)
Tests if a second file can be appended to a first.



testAutoSave
public void testAutoSave() throws Exception(Code)



testClearAttribute
public void testClearAttribute() throws Exception(Code)



testClearProperty
public void testClearProperty() throws ConfigurationException, IOException(Code)



testClone
public void testClone()(Code)
Tests the clone() method.



testCloneWithSave
public void testCloneWithSave() throws ConfigurationException(Code)
Tests saving a configuration after cloning to ensure that the clone and the original are completely detachted.



testComplexNames
public void testComplexNames()(Code)
Tests access to tag names with delimiter characters.



testConfigurationAtWithReload
public void testConfigurationAtWithReload() throws ConfigurationException(Code)
Tests if reloads are recognized by configurationAt().



testConfigurationsAtWithReload
public void testConfigurationsAtWithReload() throws ConfigurationException(Code)
Tests if reloads are recognized by configurationsAt().



testCustomDocBuilder
public void testCustomDocBuilder() throws Exception(Code)
Tests setting a custom document builder.



testDelimiterParsingDisabled
public void testDelimiterParsingDisabled() throws ConfigurationException(Code)
Tests string properties with list delimiters when delimiter parsing is disabled



testDtd
public void testDtd() throws ConfigurationException(Code)
Tests whether a DTD can be accessed.



testEmptyElements
public void testEmptyElements() throws ConfigurationException(Code)
Tests handling of empty elements.



testGetAttribute
public void testGetAttribute()(Code)



testGetCommentedProperty
public void testGetCommentedProperty()(Code)



testGetComplexProperty
public void testGetComplexProperty()(Code)



testGetProperty
public void testGetProperty()(Code)



testGetPropertyWithXMLEntity
public void testGetPropertyWithXMLEntity()(Code)



testInitCopy
public void testInitCopy() throws ConfigurationException(Code)
Tests the copy constructor.



testLoad
public void testLoad() throws Exception(Code)



testLoadAndSaveFromFile
public void testLoadAndSaveFromFile() throws Exception(Code)
Tests constructing an XMLConfiguration from a non existing file and later saving to this file.



testLoadFromStream
public void testLoadFromStream() throws Exception(Code)
Tests loading from a stream.



testLoadFromURL
public void testLoadFromURL() throws Exception(Code)
Tests loading a configuration from a URL.



testLoadInvalidXML
public void testLoadInvalidXML() throws Exception(Code)
Tests loading a non well formed XML from a string.



testLoadWithBasePath
public void testLoadWithBasePath() throws Exception(Code)



testLoadWithEncoding
public void testLoadWithEncoding() throws ConfigurationException(Code)
Tests whether the encoding is correctly detected by the XML parser. This is done by loading an XML file with the encoding "UTF-16". If this encoding is not detected correctly, an exception will be thrown that "Content is not allowed in prolog". This test case is related to issue 34204.



testReloading
public void testReloading() throws Exception(Code)
Tests collaboration between XMLConfiguration and a reloading strategy.



testSave
public void testSave() throws Exception(Code)



testSaveAttributes
public void testSaveAttributes() throws Exception(Code)
Tests saving attributes (related to issue 34442).



testSaveToStream
public void testSaveToStream() throws Exception(Code)
Tests saving to a stream.



testSaveToURL
public void testSaveToURL() throws Exception(Code)
Tests saving to a URL.



testSaveWithDoctype
public void testSaveWithDoctype() throws ConfigurationException(Code)
Tests whether the DOCTYPE survives a save operation.



testSaveWithDoctypeIDs
public void testSaveWithDoctypeIDs() throws ConfigurationException(Code)
Tests setting public and system IDs for the D'OCTYPE and then saving the configuration. This should generate a DOCTYPE declaration.



testSaveWithEncoding
public void testSaveWithEncoding() throws ConfigurationException(Code)
Tests whether the encoding is written to the generated XML file.



testSaveWithInvalidTransformerFactory
public void testSaveWithInvalidTransformerFactory()(Code)
Tests saving a configuration when an invalid transformer factory is specified. In this case the error thrown by the TransformerFactory class should be caught and re-thrown as a ConfigurationException.



testSaveWithNullEncoding
public void testSaveWithNullEncoding() throws ConfigurationException(Code)
Tests whether a default encoding is used if no specific encoding is set. According to the XSLT specification (http://www.w3.org/TR/xslt#output) this should be either UTF-8 or UTF-16.



testSetAttribute
public void testSetAttribute()(Code)



testSetProperty
public void testSetProperty() throws Exception(Code)



testSettingFileNames
public void testSettingFileNames()(Code)



testSplitLists
public void testSplitLists()(Code)
Tests string properties with list delimiters and escaped delimiters.



testSubset
public void testSubset() throws ConfigurationException(Code)
Tests the subset() method. There was a bug that calling subset() had undesired side effects.



testSubsetWithReload
public void testSubsetWithReload() throws ConfigurationException(Code)
Tests if reloads are recognized by subset().



testValidating
public void testValidating() throws ConfigurationException(Code)
Tests DTD validation using the setValidating() method.



testXPathExpressionEngine
public void testXPathExpressionEngine()(Code)
Tests accessing properties when the XPATH expression engine is set.



testgetProperty
public void testgetProperty()(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.