org.eclipse.xsd.test
Class XSDMainTest

java.lang.Object
  extended byorg.eclipse.xsd.test.XSDMainTest
Direct Known Subclasses:
XSDMainTest.Runnable

public class XSDMainTest
extends Object

Supports command line invocation to drive XML Schema model tests. It handles both headless invocation and standalone invocation.

You can execute one of these test by running

  xsd-test.bat
or
  xsd-standalone-test.bat
from the directory:
  plugins/org.eclipse.xsd.test/test/

See Also:
run(java.lang.Object), main(java.lang.String[])

Nested Class Summary
static class XSDMainTest.Runnable
           
 
Constructor Summary
XSDMainTest()
          Creates an instance.
 
Method Summary
 void loadAndPrint(String xsdFile)
          Load the XML Schema file and print information about it.
static void main(String[] args)
          Executes a stand-alone test.
protected  void printDirectives(String indent, XSDSchema xsdSchema)
          Prints directive tags for those directives that reference the given schema.
protected  void printSchemaStart(XSDSchema xsdSchema)
          Prints a header tag for the given schema.
 Object run(Object object)
          Executes a headless workbench test.
 void validate(String xsdFile)
          Load the XML Schema file and print any diagnostics information about it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSDMainTest

public XSDMainTest()
Creates an instance.

Method Detail

main

public static void main(String[] args)
Executes a stand-alone test.

Parameters:
args - an array of Strings from the command line.
See Also:
run(java.lang.Object)

run

public Object run(Object object)
Executes a headless workbench test. If no arguments are provided, the XSDPrototypicalSchema will be tested; otherwise each argument is taken to be the URI of a schema which will be loaded and printed.

Parameters:
object - an array of Strings from the command line, each representing the URI of a schema.
Returns:
0 indicating success, or 1 indicating failure.
See Also:
main(java.lang.String[])

printSchemaStart

protected void printSchemaStart(XSDSchema xsdSchema)
Prints a header tag for the given schema.

Parameters:
xsdSchema - a schema.

printDirectives

protected void printDirectives(String indent,
                               XSDSchema xsdSchema)
Prints directive tags for those directives that reference the given schema.

Parameters:
indent - the indentation string to print at the start of each line.
xsdSchema - a schema.

loadAndPrint

public void loadAndPrint(String xsdFile)
                  throws Exception
Load the XML Schema file and print information about it.

Parameters:
xsdFile - the URI of an XML Schema file.
Throws:
Exception

validate

public void validate(String xsdFile)
              throws Exception
Load the XML Schema file and print any diagnostics information about it.

Parameters:
xsdFile - the URI of an XML Schema file.
Throws:
Exception

Copyright 2001-2004 IBM Corporation and others.
All Rights Reserved.