Package org.castor.xmlctf
Class SchemaTestCase
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.castor.xmlctf.XMLTestCase
-
- org.castor.xmlctf.SchemaTestCase
-
- All Implemented Interfaces:
junit.framework.Test
public class SchemaTestCase extends XMLTestCase
A JUnit test case for testing the Castor Schema Object Model.- Version:
- $Revision: 6787 $ $Date: 2006-04-26 15:14:53 -0600 (Wed, 26 Apr 2006) $
- Author:
- Keith Visco, Arnaud Blandin
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String_goldFileNameGold file to compare a schema against.-
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 SchemaTestCase(java.lang.String name)Default constructorSchemaTestCase(CastorTestCase castorTc, UnitTestCase tc)Creates a new SchemaTest with the given name
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrunTest()Override this method to run the test and assert its state.voidsetSchemaName(java.lang.String name)Sets the name of the XML schema file to test.protected voidsetUp()static junit.framework.Testsuite()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
-
SchemaTestCase
public SchemaTestCase(java.lang.String name)
Default constructor- Parameters:
name- the name of the test
-
SchemaTestCase
public SchemaTestCase(CastorTestCase castorTc, UnitTestCase tc)
Creates a new SchemaTest with the given name- Parameters:
castorTc- the reference to the jar/directorytc- the UnitTestCase that wraps the configuration for this XML Test case.
-
-
Method Detail
-
setSchemaName
public void setSchemaName(java.lang.String name)
Sets the name of the XML schema file to test.- Parameters:
name- the name of the XML schema file to test.
-
suite
public static junit.framework.Test suite()
-
setUp
protected void setUp() throws java.lang.Exception- Specified by:
setUpin classXMLTestCase- Throws:
java.lang.Exception
-
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
-
runTest
public void runTest() throws java.lang.ThrowableOverride this method to run the test and assert its state.- Overrides:
runTestin classjunit.framework.TestCase- Throws:
java.lang.Throwable- if any exception is thrown
-
-