org.castor.xmlctf
Class TestSourceGenerator

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.castor.xmlctf.XMLTestCase
              extended byorg.castor.xmlctf.TestSourceGenerator
All Implemented Interfaces:
junit.framework.Test

public class TestSourceGenerator
extends XMLTestCase

This class encapsulate all the logic needed 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
TestSourceGenerator(CastorTestCase test, UnitTestCase unit, OnlySourceGenerationTest sourceGen)
           
TestSourceGenerator(CastorTestCase test, UnitTestCase unit, SourceGeneratorTest sourceGen)
           
 
Method Summary
 void runTest()
          Runs our source generation test.
protected  void setUp()
          Sets up this test suite.
protected  void tearDown()
          Cleans up after this unit test.
 
Methods inherited from class org.castor.xmlctf.XMLTestCase
buildObjectModel, checkExceptionWasExpected, cleanup, getTestSuiteName, initializeListeners, invokeEnumeratedMethods, setTestSuiteName, testMarshal, testUnmarshal, testUnmarshal, verbose
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestSourceGenerator

public TestSourceGenerator(CastorTestCase test,
                           UnitTestCase unit,
                           OnlySourceGenerationTest sourceGen)

TestSourceGenerator

public TestSourceGenerator(CastorTestCase test,
                           UnitTestCase unit,
                           SourceGeneratorTest sourceGen)
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Sets up this test suite.

Throws:
java.lang.Exception - if anything goes wrong

tearDown

protected void tearDown()
                 throws java.lang.Exception
Cleans up after this unit test.

Throws:
java.lang.Exception - if anything goes wrong

runTest

public void runTest()
Runs our source generation test. Creates, configures, and executes the source generator on each schema we have to test. Compiles the generated code. Loads classes via the appropriate class loader.



Intalio Inc. (C) 1999-2007. All rights reserved http://www.intalio.com