Package org.castor.xmlctf
Class OnlySourceGenerationTestCase
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.castor.xmlctf.XMLTestCase
-
- org.castor.xmlctf.OnlySourceGenerationTestCase
-
- All Implemented Interfaces:
junit.framework.Test
public class OnlySourceGenerationTestCase extends XMLTestCase
This class encapsulate all the logic to run the tests patterns for the source generator. It is able to run the source generator by itself and then compile the file that have been generated. This class does not do anything additional. It only runs the source generator and ensures that the generated source will compile without error.- Version:
- $Revision: 0000 $ $Date: $
- Author:
- Edward Kuns
-
-
Field Summary
-
Fields inherited from class org.castor.xmlctf.XMLTestCase
_configuration, _failure, _hasDump, _listener, _listenerGoldFile, _listenerType, _mapping, _name, _outputRootFile, _printStack, _rootClass, _rootClassName, _skip, _suiteName, _test, _unitTest, _verbose
-
-
Constructor Summary
Constructors Constructor Description OnlySourceGenerationTestCase(java.lang.String name)Create a new SourceGeneratorTestCase with the given name.OnlySourceGenerationTestCase(CastorTestCase test, UnitTestCase unit, OnlySourceGenerationTest sourceGen)Creates a new test case for the given setup.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrunTest()protected voidsetUp()Sets up this test suite.junit.framework.Testsuite()Returns the test suite for this given test setup.protected voidtearDown()Cleans up after this unit test (nothing to do except provide output).-
Methods inherited from class org.castor.xmlctf.XMLTestCase
buildObjectModel, checkExceptionWasExpected, cleanup, getTestSuiteName, getXMLContext, initializeListeners, invokeEnumeratedMethods, setTestSuiteName, setXMLContext, testMarshal, testUnmarshal, testUnmarshal, verbose
-
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toString
-
-
-
-
Constructor Detail
-
OnlySourceGenerationTestCase
public OnlySourceGenerationTestCase(CastorTestCase test, UnitTestCase unit, OnlySourceGenerationTest sourceGen)
Creates a new test case for the given setup.- Parameters:
test- the reference to the jar/directoryunit- the UnitTestCase that wraps the configuration for this XML Test case.sourceGen- the Source Generator test to be executedoutputRoot- the directory that contains the files needed for the test
-
OnlySourceGenerationTestCase
public OnlySourceGenerationTestCase(java.lang.String name)
Create a new SourceGeneratorTestCase with the given name.- Parameters:
name- name for the test case
-
-
Method Detail
-
suite
public junit.framework.Test suite()
Returns the test suite for this given test setup.- Returns:
- the test suite for this given test setup.
-
setUp
protected void setUp() throws java.lang.ExceptionSets up this test suite.- Specified by:
setUpin classXMLTestCase- Throws:
java.lang.Exception- if anything goes wrong
-
runTest
public void runTest()
- Overrides:
runTestin classjunit.framework.TestCase
-
tearDown
protected void tearDown() throws java.lang.ExceptionCleans up after this unit test (nothing to do except provide output).- Specified by:
tearDownin classXMLTestCase- Throws:
java.lang.Exception- never
-
-