public class SetNestedPropertiesRuleTestCase extends Object
Test case for SetNestedPropertiesRule
. This contains tests for the main applications of the rule and two
more general tests of digester functionality used by this rule.
Modifier and Type | Field and Description |
---|---|
protected static String |
TEST_XML
Simple test xml document used in the tests.
|
Constructor and Description |
---|
SetNestedPropertiesRuleTestCase() |
Modifier and Type | Method and Description |
---|---|
void |
testAutomaticallySetProperties()
Test that you can successfully automatically set properties.
|
void |
testCustomisedProperties1()
Test that you can customise the property mappings using the constructor which takes arrays-of-strings.
|
void |
testCustomisedProperties2a()
Test that you can ignore a single input xml element using the constructor which takes a single remapping.
|
void |
testCustomisedProperties2b()
Test that you can customise the property mappings using the constructor which takes a single remapping.
|
void |
testMandatoryProperties()
Test that it is an error when a child element exists but no corresponding java property exists.
|
void |
testMultiRuleMatch()
Test that:
you can have rules matching the same pattern as the SetNestedPropertiesRule,
you can have rules matching child elements of the rule,
the Rules object is reset nicely.
|
void |
testRecursiveNestedProperties()
Test that the rule works in a sane manner when the associated pattern is a wildcard such that the rule matches
one of its own child elements.
|
void |
testUnknownChildrenCausesException()
Test that unknown child elements trigger an exception.
|
void |
testUnknownChildrenExceptionOverride()
Test that unknown child elements are allowed if the appropriate flag is set.
|
protected static final String TEST_XML
public SetNestedPropertiesRuleTestCase()
public void testAutomaticallySetProperties() throws SAXException, IOException
SAXException
IOException
public void testMandatoryProperties() throws SAXException, IOException
SAXException
IOException
public void testCustomisedProperties1() throws SAXException, IOException
SAXException
IOException
public void testCustomisedProperties2a() throws SAXException, IOException
SAXException
IOException
public void testCustomisedProperties2b() throws SAXException, IOException
SAXException
IOException
public void testMultiRuleMatch() throws SAXException, IOException
SAXException
IOException
public void testUnknownChildrenCausesException() throws SAXException, IOException
SAXException
IOException
public void testUnknownChildrenExceptionOverride() throws SAXException, IOException
SAXException
IOException
public void testRecursiveNestedProperties() throws SAXException, IOException
See bugzilla entry 31393.
SAXException
IOException
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.