org.castor.xmlctf
Class MarshallingFrameworkTestCase

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

public class MarshallingFrameworkTestCase
extends XMLTestCase

This class encapsulates all the logic to run the test patterns for the Castor marshalling framework. This include introspection and mapping.

Version:
$Revision: 6787 $ $Date: 2004-09-10 18:23:03 -0600 (Fri, 10 Sep 2004) $
Author:
Sebastien Gignoux, Arnaud Blandin

Field Summary
protected  boolean _hasRandom
          If true, the randomize() function has been implemented in the root class.
protected  MarshallingTest _marshallingConf
          Contains the configuration for this test case.
 
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
MarshallingFrameworkTestCase(CastorTestCase test, UnitTestCase unit, MarshallingTest marshalling)
          Creates a CTF test case for the Marshalling framework.
MarshallingFrameworkTestCase(java.lang.String name)
          Create a new MarshallingFrameworkTestCase with the given name and a null marshalling configuration.
 
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()
          Clean up after a test -- nothing to do except display output.
 
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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_marshallingConf

protected final MarshallingTest _marshallingConf
Contains the configuration for this test case. The configuration is directly read for the test descriptor file located in a jar or in a directory.


_hasRandom

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

Constructor Detail

MarshallingFrameworkTestCase

public MarshallingFrameworkTestCase(CastorTestCase test,
                                    UnitTestCase unit,
                                    MarshallingTest marshalling)
Creates a CTF test case for the Marshalling framework.

Parameters:
test - A Test Case
unit - A configuration element for a test case from a TestDescriptor configuration file
marshalling - a Marshalling test definition from a TestDescriptor configuration file

MarshallingFrameworkTestCase

public MarshallingFrameworkTestCase(java.lang.String name)
Create a new MarshallingFrameworkTestCase with the given name and a null marshalling configuration. This constructor should not be used!

Parameters:
name - Name for the MarshallingFrameworkTestCase
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. Loads the mapping file if any.

Nothing in this setUp() method should ever be expected to fail. Thus, there are no checks against _failure. If anything goes wrong here, there is a problem with the individual test case configuration.

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception - if anything goes wrong

tearDown

protected void tearDown()
                 throws java.lang.Exception
Clean up after a test -- nothing to do except display output.

Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception - if anything goes wrong


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