|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.tree.xpath.AbstractXPathTest
public abstract class AbstractXPathTest
A base class for testing classes of the XPath package. This base class creates a hierarchy of nodes in its setUp() method that can be used for test cases.
Field Summary | |
---|---|
protected static String |
ATTR_NAME
Constant for the name of the counter attribute. |
protected static int |
CHILD_COUNT
Constant for the number of sub nodes. |
protected static String |
CHILD_NAME1
Constant for the name of the first child. |
protected static String |
CHILD_NAME2
Constant for the name of the second child. |
protected static int |
LEVEL_COUNT
Constant for the number of levels in the hierarchy. |
protected ConfigurationNode |
root
Stores the root node of the hierarchy. |
Constructor Summary | |
---|---|
AbstractXPathTest()
|
Method Summary | |
---|---|
protected ConfigurationNode |
constructHierarchy(int levels)
Builds up a hierarchy of nodes. |
protected List<ConfigurationNode> |
iterationElements(org.apache.commons.jxpath.ri.model.NodeIterator iterator)
Returns a list with all configuration nodes contained in the specified iteration. |
protected int |
iteratorSize(org.apache.commons.jxpath.ri.model.NodeIterator iterator)
Determines the number of elements contained in the given iterator. |
void |
setUp()
|
void |
tearDown()
Clears the test environment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String ATTR_NAME
protected static final String CHILD_NAME1
protected static final String CHILD_NAME2
protected static final int CHILD_COUNT
protected static final int LEVEL_COUNT
protected ConfigurationNode root
Constructor Detail |
---|
public AbstractXPathTest()
Method Detail |
---|
public void setUp() throws Exception
Exception
public void tearDown() throws Exception
Exception
protected ConfigurationNode constructHierarchy(int levels)
CHILD_COUNT
child nodes having the names CHILD_NAME1
or
CHILD_NAME2
. Their values are named like their parent
node with an additional index. Each node has an attribute with a counter
value.
levels
- the number of levels in the hierarchy
protected int iteratorSize(org.apache.commons.jxpath.ri.model.NodeIterator iterator)
iterator
- the iterator
protected List<ConfigurationNode> iterationElements(org.apache.commons.jxpath.ri.model.NodeIterator iterator)
iterator
- the iterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |