|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.xml.AbstractObjectHandler
org.progeeks.junit.JUnitHandler
public class JUnitHandler
ObjectHandler implementation that load JUnit test suite's, which can consist of other test suites, test cases, and FixturedTestCase (a custom test case) objects.
Field Summary | |
---|---|
static java.lang.String |
FILE_ATTRIBUTE
Attribute required for the testSuiteXml tag that denotes the external file to load the test suite from. |
static java.lang.String |
LOAD_SUITE_TAG
Tag denoting a test suite that is to be loaded from another XML file. |
static java.lang.String |
NAME_FIELD
Field/attribute which denotes the name of the test suite. |
static java.lang.String |
TEST_SUITE_TAG
Tag denoting a test suite. |
static java.lang.String |
TESTS_FIELD
Field containing a list of the tests that belong to the suite. |
Constructor Summary | |
---|---|
JUnitHandler()
|
Method Summary | |
---|---|
boolean |
canHandle(java.lang.String tag)
See if we can handle that tag we're being presented with. |
java.lang.Object |
createObject(java.lang.String tag,
org.xml.sax.Attributes atts,
ObjectXmlReader reader)
Creates and returns an test suite based on the specified parameters. |
protected void |
generateContextualTestCases(junit.framework.TestSuite suite,
ContextualTestCase contextualTest)
Uses introspection to determine the test methods inside of a contextual test case and adds those tests to the supplied test suite. |
java.lang.Object |
getProperty(java.lang.Object obj,
java.lang.String field,
ObjectXmlReader reader)
Returns the current value of the specified property in the specified object. |
java.lang.Class |
getPropertyClass(java.lang.Object object,
java.lang.String field,
ObjectXmlReader reader)
Returns the base type for the specified field for the given test suite. |
java.util.Collection |
getPropertyCollection(java.lang.Object obj,
java.lang.String field,
ObjectXmlReader reader)
Returns a collection for the specified field that can be used to accumulate multiple object values. |
void |
setProperty(java.lang.Object object,
java.lang.String field,
java.lang.Object value,
ObjectXmlReader reader)
Sets a property on the specified test suite. |
void |
setTextProperty(java.lang.Object object,
java.lang.String field,
java.lang.String value,
ObjectXmlReader reader)
Sets a text property on the specified test suite. |
Methods inherited from class org.progeeks.util.xml.AbstractObjectHandler |
---|
resolveObject, setConfigurationProperty, setContainedText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TEST_SUITE_TAG
public static final java.lang.String LOAD_SUITE_TAG
public static final java.lang.String NAME_FIELD
public static final java.lang.String TESTS_FIELD
public static final java.lang.String FILE_ATTRIBUTE
Constructor Detail |
---|
public JUnitHandler()
Method Detail |
---|
public boolean canHandle(java.lang.String tag)
canHandle
in interface ObjectHandler
canHandle
in class AbstractObjectHandler
public java.lang.Object createObject(java.lang.String tag, org.xml.sax.Attributes atts, ObjectXmlReader reader)
createObject
in interface ObjectHandler
createObject
in class AbstractObjectHandler
public java.lang.Class getPropertyClass(java.lang.Object object, java.lang.String field, ObjectXmlReader reader)
getPropertyClass
in interface ObjectHandler
getPropertyClass
in class AbstractObjectHandler
public void setProperty(java.lang.Object object, java.lang.String field, java.lang.Object value, ObjectXmlReader reader)
setProperty
in interface ObjectHandler
setProperty
in class AbstractObjectHandler
public void setTextProperty(java.lang.Object object, java.lang.String field, java.lang.String value, ObjectXmlReader reader)
setTextProperty
in interface ObjectHandler
setTextProperty
in class AbstractObjectHandler
public java.util.Collection getPropertyCollection(java.lang.Object obj, java.lang.String field, ObjectXmlReader reader)
getPropertyCollection
in interface ObjectHandler
getPropertyCollection
in class AbstractObjectHandler
public java.lang.Object getProperty(java.lang.Object obj, java.lang.String field, ObjectXmlReader reader)
AbstractObjectHandler
getProperty
in interface ObjectHandler
getProperty
in class AbstractObjectHandler
protected void generateContextualTestCases(junit.framework.TestSuite suite, ContextualTestCase contextualTest)
suite
- Test suite to add tests to.contextualTest
- Contextual test object to find test methods in.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |