org.castor.xmlctf
Class SourceGeneratorTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.castor.xmlctf.XMLTestCase
              extended by org.castor.xmlctf.SourceGeneratorTestCase
All Implemented Interfaces:
junit.framework.Test

public class SourceGeneratorTestCase
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.

Version:
$Revision: 7006 $ $Date: 2005-02-28 17:22:46 -0700 (Mon, 28 Feb 2005) $
Author:
Arnaud Blandin, Sebastien Gignoux

Field Summary
protected  boolean _hasRandom
          If true, the randomize() function has been implemented in the root class.
protected  SourceGeneratorTest _sourceGenConf
          Contains the information for the configuration for all the tests in this jar.
 
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
SourceGeneratorTestCase(CastorTestCase test, UnitTestCase unit, SourceGeneratorTest sourceGen)
          Creates a new test case for the given setup.
SourceGeneratorTestCase(java.lang.String name)
          Create a new SourceGeneratorTestCase with the given name.
 
Method Summary
protected  void setUp()
          Sets up this test suite.
 junit.framework.Test suite()
          Returns the test suite for this given test setup.
protected  void tearDown()
          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
countTestCases, createResult, getName, run, run, runBare, runTest, 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

_sourceGenConf

protected final SourceGeneratorTest _sourceGenConf
Contains the information for the configuration for all the tests in this jar.


_hasRandom

protected final boolean _hasRandom
If true, the randomize() function has been implemented in the root class.

Constructor Detail

SourceGeneratorTestCase

public SourceGeneratorTestCase(CastorTestCase test,
                               UnitTestCase unit,
                               SourceGeneratorTest sourceGen)
Creates a new test case for the given setup.

Parameters:
test - the reference to the jar/directory
unit - the UnitTestCase that wraps the configuration for this XML Test case.
sourceGen - the Source Generator test to be executed

SourceGeneratorTestCase

public SourceGeneratorTestCase(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.Exception
Sets up this test suite.

Specified by:
setUp in class XMLTestCase
Throws:
java.lang.Exception - if anything goes wrong

tearDown

protected void tearDown()
                 throws java.lang.Exception
Cleans up after this unit test (nothing to do except provide output).

Specified by:
tearDown in class XMLTestCase
Throws:
java.lang.Exception - never


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