public class NodeCreateRuleTestCase extends Object
Test case for the NodeCreateRule
.
Modifier and Type | Field and Description |
---|---|
protected static String |
TEST_XML
Simple test xml document used in the tests.
|
Constructor and Description |
---|
NodeCreateRuleTestCase() |
Modifier and Type | Method and Description |
---|---|
protected InputStream |
getInputStream(String name)
Return an appropriate InputStream for the specified test file (which must be inside our current package.
|
void |
testAttributes()
Tests whether attributes are correctly imported into the fragment, using the example in the Test1 XML file.
|
void |
testDocumentFragment()
Tests simple fragment construction, using the
TEST_XML XML input data. |
void |
testElement()
Tests simple element construction, using the
TEST_XML XML input data. |
void |
testEntityText()
This unit test checks that text nodes are correctly created when xml entities are used.
|
void |
testImport()
Tests whether the created fragment can be imported into an existing document.
|
void |
testInvalidNodeTypes()
Tests simple element construction, using the
TEST_XML XML input data. |
void |
testNamespacedAttribute()
Tests whether namespaced attributes are handled correctly, using the example from the file Test10 XML file.
|
void |
testNamespaces()
Tests whether namespaces are handled correctly, using the example from the file Test3 XML file.
|
void |
testNested()
Tests whether control is returned to digester after fragment construction.
|
void |
testNonNamespacedAttribute()
Tests whether non-namespaced attributes are handled correctly, using the example from the file Test11 XML file.
|
protected static final String TEST_XML
public NodeCreateRuleTestCase()
public void testInvalidNodeTypes() throws Exception
TEST_XML
XML input data.Exception
public void testElement() throws SAXException, IOException
TEST_XML
XML input data.SAXException
IOException
public void testDocumentFragment() throws SAXException, IOException
TEST_XML
XML input data.SAXException
IOException
public void testNested() throws SAXException, IOException
SAXException
IOException
public void testAttributes() throws SAXException, IOException
SAXException
IOException
public void testNamespaces() throws SAXException, IOException
SAXException
IOException
public void testNamespacedAttribute() throws SAXException, IOException
SAXException
IOException
public void testNonNamespacedAttribute() throws SAXException, IOException
SAXException
IOException
public void testImport() throws SAXException, ParserConfigurationException, IOException
public void testEntityText() throws Exception
Exception
protected InputStream getInputStream(String name) throws IOException
name
- Name of the test file we wantIOException
- if an input/output error occursCopyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.