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 Details

    • _goldFileName

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

    • SchemaTestCase

      public SchemaTestCase(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 Details

    • setSchemaName

      public void setSchemaName(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 Exception
      Specified by:
      setUp in class XMLTestCase
      Throws:
      Exception
    • tearDown

      protected void tearDown() throws Exception
      Cleans up after this unit test (nothing to do except provide output).
      Specified by:
      tearDown in class XMLTestCase
      Throws:
      Exception - never
    • runTest

      public void runTest() throws Throwable
      Override this method to run the test and assert its state.
      Overrides:
      runTest in class junit.framework.TestCase
      Throws:
      Throwable - if any exception is thrown