|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.castor.xmlctf.TestWithReferenceDocument
class TestWithReferenceDocument
Implements a test case that tests code written by the XML source generator. This class uses the generated source to read and write an XML document, comparing the XML document written against the reference document that was originally read in.
The test follows this sequence:
Field Summary | |
---|---|
protected java.lang.String |
_builderClassName
Class name of the ObjectModelBuilder. |
protected FailureType |
_failure
The failure object that is not null is the test intends to fail. |
protected java.lang.String |
_goldFileName
Gold file filename, really only useful if a class builder and no input file is given. |
protected java.lang.String |
_inputName
Input file for test XML. |
protected java.lang.String |
_outputName
Header of the name of all our output files ... |
protected CastorTestCase |
_test
Used only to retrieved the classloader. |
Constructor Summary | |
---|---|
TestWithReferenceDocument(java.lang.String name)
Blank constructor for this test case. |
|
TestWithReferenceDocument(java.lang.String name,
XMLTestCase tc)
Constructs a test case that when invoked will delegate to the provided test case. |
Method Summary | |
---|---|
void |
runTest()
Runs our test case using our delegate object where necessary. |
protected void |
setUp()
Provides setup for our delegated test case, depending on the type of test case we are delegating for. |
protected void |
tearDown()
Provides tear down for our delegated test case, depending on the type of test case we are delegating for. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final CastorTestCase _test
protected final FailureType _failure
protected final java.lang.String _builderClassName
protected final java.lang.String _outputName
protected final java.lang.String _inputName
protected final java.lang.String _goldFileName
Constructor Detail |
---|
TestWithReferenceDocument(java.lang.String name)
name
- Name of our delegate test caseTestWithReferenceDocument(java.lang.String name, XMLTestCase tc)
name
- Name of our delegate test casetc
- Method Detail |
---|
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
- if anything goes wrong during setupprotected void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
- if anything goes wrong during teardownpublic void runTest() throws java.lang.Exception
FIXME: Fix this so it throws only specific and necessary exceptions
runTest
in class junit.framework.TestCase
java.lang.Exception
- if anything goes wrong
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |