org.castor.xmlctf
Class SchemaTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.castor.xmlctf.XMLTestCase
              extended by 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
protected  java.lang.String _goldFileName
          Gold 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
SchemaTestCase(CastorTestCase castorTc, UnitTestCase tc)
          Creates a new SchemaTest with the given name
SchemaTestCase(java.lang.String name)
          Default constructor
 
Method Summary
 void runTest()
          Override this method to run the test and assert its state.
 void setSchemaName(java.lang.String name)
          Sets the name of the XML schema file to test.
protected  void setUp()
           
static junit.framework.Test suite()
           
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, 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
 

Field Detail

_goldFileName

protected final java.lang.String _goldFileName
Gold file to compare a schema against. Optional. Only needed if schema changes during parsing, i.e., due to redefine element.

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/directory
tc - 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
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

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

Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception - never

runTest

public void runTest()
             throws java.lang.Throwable
Override this method to run the test and assert its state.

Overrides:
runTest in class junit.framework.TestCase
Throws:
java.lang.Throwable - if any exception is thrown


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