org.exolab.castor.tests.framework.testDescriptor

Class SourceGeneratorTest

Implemented Interfaces:
java.io.Serializable

public class SourceGeneratorTest
extends java.lang.Object
implements java.io.Serializable

Tests source generation and then tests the generated source, testing both marshaling and unmarshaling.
Version:
$Revision: 7006 $ $Date$
See Also:
Serialized Form

Constructor Summary

SourceGeneratorTest()

Method Summary

void
addSchema(int index, java.lang.String vSchema)
void
addSchema(java.lang.String vSchema)
void
addUnitTestCase(int index, UnitTestCase vUnitTestCase)
void
addUnitTestCase(UnitTestCase vUnitTestCase)
java.util.Enumeration
enumerateSchema()
Method enumerateSchema.
java.util.Enumeration
enumerateUnitTestCase()
Method enumerateUnitTestCase.
java.lang.String
getBindingFile()
Returns the value of field 'bindingFile'.
CollectionType
getCollection()
Returns the value of field 'collection'.
ExpectedSources
getExpectedSources()
Returns the value of field 'expectedSources'.
java.lang.String
getPackage()
Returns the value of field 'package'.
java.lang.String
getProperty_File()
Returns the value of field 'property_File'.
Root_Object
getRoot_Object()
Returns the value of field 'root_Object'.
java.lang.String[]
getSchema()
Method getSchema.Returns the contents of the collection in an Array.
java.lang.String
getSchema(int index)
Method getSchema.
int
getSchemaCount()
Method getSchemaCount.
UnitTestCase[]
getUnitTestCase()
Method getUnitTestCase.Returns the contents of the collection in an Array.
UnitTestCase
getUnitTestCase(int index)
Method getUnitTestCase.
int
getUnitTestCaseCount()
Method getUnitTestCaseCount.
boolean
isValid()
Method isValid.
void
marshal(java.io.Writer out)
void
marshal(org.xml.sax.ContentHandler handler)
void
removeAllSchema()
void
removeAllUnitTestCase()
boolean
removeSchema(java.lang.String vSchema)
Method removeSchema.
java.lang.String
removeSchemaAt(int index)
Method removeSchemaAt.
boolean
removeUnitTestCase(UnitTestCase vUnitTestCase)
Method removeUnitTestCase.
UnitTestCase
removeUnitTestCaseAt(int index)
Method removeUnitTestCaseAt.
void
setBindingFile(java.lang.String bindingFile)
Sets the value of field 'bindingFile'.
void
setCollection(CollectionType collection)
Sets the value of field 'collection'.
void
setExpectedSources(ExpectedSources expectedSources)
Sets the value of field 'expectedSources'.
void
setPackage(java.lang.String _package)
Sets the value of field 'package'.
void
setProperty_File(java.lang.String property_File)
Sets the value of field 'property_File'.
void
setRoot_Object(Root_Object root_Object)
Sets the value of field 'root_Object'.
void
setSchema(int index, java.lang.String vSchema)
void
setSchema(java.lang.String[] vSchemaArray)
void
setUnitTestCase(int index, UnitTestCase vUnitTestCase)
void
setUnitTestCase(UnitTestCase[] vUnitTestCaseArray)
static SourceGeneratorTest
unmarshal(java.io.Reader reader)
Method unmarshal.
void
validate()

Constructor Details

SourceGeneratorTest

public SourceGeneratorTest()

Method Details

addSchema

public void addSchema(int index,
                      java.lang.String vSchema)
            throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vSchema -

addSchema

public void addSchema(java.lang.String vSchema)
            throws java.lang.IndexOutOfBoundsException
Parameters:
vSchema -

addUnitTestCase

public void addUnitTestCase(int index,
                            UnitTestCase vUnitTestCase)
            throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vUnitTestCase -

addUnitTestCase

public void addUnitTestCase(UnitTestCase vUnitTestCase)
            throws java.lang.IndexOutOfBoundsException
Parameters:
vUnitTestCase -

enumerateSchema

public java.util.Enumeration enumerateSchema()
Method enumerateSchema.
Returns:
an Enumeration over all java.lang.String elements

enumerateUnitTestCase

public java.util.Enumeration enumerateUnitTestCase()
Method enumerateUnitTestCase.
Returns:
an Enumeration over all org.exolab.castor.tests.framework.testDescriptor.UnitTestCase elements

getBindingFile

public java.lang.String getBindingFile()
Returns the value of field 'bindingFile'.
Returns:
the value of field 'BindingFile'.

getCollection

public CollectionType getCollection()
Returns the value of field 'collection'. The field 'collection' has the following description: The data type to use in collections.
Returns:
the value of field 'Collection'.

getExpectedSources

public ExpectedSources getExpectedSources()
Returns the value of field 'expectedSources'.
Returns:
the value of field 'ExpectedSources'.

getPackage

public java.lang.String getPackage()
Returns the value of field 'package'.
Returns:
the value of field 'Package'.

getProperty_File

public java.lang.String getProperty_File()
Returns the value of field 'property_File'.
Returns:
the value of field 'Property_File'.

getRoot_Object

public Root_Object getRoot_Object()
Returns the value of field 'root_Object'. The field 'root_Object' has the following description: The qualified name of the root Object. TODO: define a pattern to describe a Java quailified name.
Returns:
the value of field 'Root_Object'.

getSchema

public java.lang.String[] getSchema()
Method getSchema.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getSchema

public java.lang.String getSchema(int index)
            throws java.lang.IndexOutOfBoundsException
Method getSchema.
Parameters:
index -
Returns:
the value of the java.lang.String at the given index

getSchemaCount

public int getSchemaCount()
Method getSchemaCount.
Returns:
the size of this collection

getUnitTestCase

public UnitTestCase[] getUnitTestCase()
Method getUnitTestCase.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getUnitTestCase

public UnitTestCase getUnitTestCase(int index)
            throws java.lang.IndexOutOfBoundsException
Method getUnitTestCase.
Parameters:
index -
Returns:
the value of the org.exolab.castor.tests.framework.testDescriptor.UnitTestCase at the given index

getUnitTestCaseCount

public int getUnitTestCaseCount()
Method getUnitTestCaseCount.
Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.
Returns:
true if this object is valid according to the schema

marshal

public void marshal(java.io.Writer out)
            throws MarshalException,
                   ValidationException
Parameters:
out -
Throws:
MarshalException - if object is null or if any SAXException is thrown during marshaling
ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(org.xml.sax.ContentHandler handler)
            throws java.io.IOException,
                   MarshalException,
                   ValidationException
Parameters:
handler -
Throws:
ValidationException - if this object is an invalid instance according to the schema
MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllSchema

public void removeAllSchema()

removeAllUnitTestCase

public void removeAllUnitTestCase()

removeSchema

public boolean removeSchema(java.lang.String vSchema)
Method removeSchema.
Parameters:
vSchema -
Returns:
true if the object was removed from the collection.

removeSchemaAt

public java.lang.String removeSchemaAt(int index)
Method removeSchemaAt.
Parameters:
index -
Returns:
the element removed from the collection

removeUnitTestCase

public boolean removeUnitTestCase(UnitTestCase vUnitTestCase)
Method removeUnitTestCase.
Parameters:
vUnitTestCase -
Returns:
true if the object was removed from the collection.

removeUnitTestCaseAt

public UnitTestCase removeUnitTestCaseAt(int index)
Method removeUnitTestCaseAt.
Parameters:
index -
Returns:
the element removed from the collection

setBindingFile

public void setBindingFile(java.lang.String bindingFile)
Sets the value of field 'bindingFile'.
Parameters:
bindingFile - the value of field 'bindingFile'.

setCollection

public void setCollection(CollectionType collection)
Sets the value of field 'collection'. The field 'collection' has the following description: The data type to use in collections.
Parameters:
collection - the value of field 'collection'.

setExpectedSources

public void setExpectedSources(ExpectedSources expectedSources)
Sets the value of field 'expectedSources'.
Parameters:
expectedSources - the value of field 'expectedSources'.

setPackage

public void setPackage(java.lang.String _package)
Sets the value of field 'package'.
Parameters:
_package -

setProperty_File

public void setProperty_File(java.lang.String property_File)
Sets the value of field 'property_File'.
Parameters:
property_File - the value of field 'property_File'.

setRoot_Object

public void setRoot_Object(Root_Object root_Object)
Sets the value of field 'root_Object'. The field 'root_Object' has the following description: The qualified name of the root Object. TODO: define a pattern to describe a Java quailified name.
Parameters:
root_Object - the value of field 'root_Object'.

setSchema

public void setSchema(int index,
                      java.lang.String vSchema)
            throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vSchema -

setSchema

public void setSchema(java.lang.String[] vSchemaArray)
Parameters:
vSchemaArray -

setUnitTestCase

public void setUnitTestCase(int index,
                            UnitTestCase vUnitTestCase)
            throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vUnitTestCase -

setUnitTestCase

public void setUnitTestCase(UnitTestCase[] vUnitTestCaseArray)
Parameters:
vUnitTestCaseArray -

unmarshal

public static SourceGeneratorTest unmarshal(java.io.Reader reader)
            throws MarshalException,
                   ValidationException
Method unmarshal.
Parameters:
reader -
Returns:
the unmarshaled org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest
Throws:
MarshalException - if object is null or if any SAXException is thrown during marshaling
ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
            throws ValidationException
Throws:
ValidationException - if this object is an invalid instance according to the schema

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