org.exolab.castor.tests.framework.testDescriptor

Class SchemaTest

Implemented Interfaces:
java.io.Serializable

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

Tests a schema.
Version:
$Revision: 6767 $ $Date$
See Also:
Serialized Form

Constructor Summary

SchemaTest()

Method Summary

void
addUnitTestCase(int index, UnitTestCase vUnitTestCase)
void
addUnitTestCase(UnitTestCase vUnitTestCase)
java.util.Enumeration
enumerateUnitTestCase()
Method enumerateUnitTestCase.
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
removeAllUnitTestCase()
boolean
removeUnitTestCase(UnitTestCase vUnitTestCase)
Method removeUnitTestCase.
UnitTestCase
removeUnitTestCaseAt(int index)
Method removeUnitTestCaseAt.
void
setUnitTestCase(int index, UnitTestCase vUnitTestCase)
void
setUnitTestCase(UnitTestCase[] vUnitTestCaseArray)
static SchemaTest
unmarshal(java.io.Reader reader)
Method unmarshal.
void
validate()

Constructor Details

SchemaTest

public SchemaTest()

Method Details

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 -

enumerateUnitTestCase

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

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

removeAllUnitTestCase

public void removeAllUnitTestCase()

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

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 SchemaTest unmarshal(java.io.Reader reader)
            throws MarshalException,
                   ValidationException
Method unmarshal.
Parameters:
reader -
Returns:
the unmarshaled org.exolab.castor.tests.framework.testDescriptor.SchemaTest
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