Package org.opensaml.core.testing
Class XMLObjectProviderBaseTestCase
java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.core.testing.XMLObjectBaseTestCase
org.opensaml.core.testing.XMLObjectProviderBaseTestCase
Base test case for
XMLObjects in XMLTooling for which we need a full set
of object provider tests, i.e marshalling and unmarshalling of single elements; with optional
attributes; and with child elements.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringLocation of file containing a single element with child elements.protected DocumentThe expected result of a marshalled single element with child elements.protected DocumentThe expected result of a marshalled single element with no optional attributes.protected DocumentThe expected result of a marshalled single element with all optional attributes.protected DocumentThe expected result of a marshalled single element some unknown attributes.protected DocumentThe result of parsing the invalid file.protected StringLocation of file containing some kind of invalid content.protected StringLocation of file containing a single element with NO optional attributes.protected StringLocation of file containing a single element with all optional attributes.protected StringLocation of file containing a single element with some unknown attributes.Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidInit testing fields.voidtestAttributeIDnessMarshall(XMLObject target, String idValue) Test marshalling of attribute IDness.voidTests marshalling the contents of a single element with child elements to a DOM document.voidTests unmarshalling a document that contains a single element with children.abstract voidTests marshalling the contents of a single element, with no optional attributes, to a DOM document.voidTests marshalling the contents of a single element, with all optional attributes, to a DOM document.voidTests unmarshalling a document that contains a single element (no children) with all that element's optional attributes.voidTests marshalling the contents of a single element, some unknown attributes, to a DOM document.voidTests unmarshalling a document that contains a single element (no children) with all that element's optional attributes.abstract voidTests unmarshalling a document that contains a single element (no children) with no optional attributes.Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElementMethods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
Field Details
-
singleElementFile
Location of file containing a single element with NO optional attributes. -
singleElementOptionalAttributesFile
Location of file containing a single element with all optional attributes. -
singleElementUnknownAttributesFile
Location of file containing a single element with some unknown attributes. -
childElementsFile
Location of file containing a single element with child elements. -
invalidFile
Location of file containing some kind of invalid content. -
expectedDOM
The expected result of a marshalled single element with no optional attributes. -
expectedOptionalAttributesDOM
The expected result of a marshalled single element with all optional attributes. -
expectedUnknownAttributesDOM
The expected result of a marshalled single element some unknown attributes. -
expectedChildElementsDOM
The expected result of a marshalled single element with child elements. -
invalidDOM
The result of parsing the invalid file.
-
-
Constructor Details
-
XMLObjectProviderBaseTestCase
public XMLObjectProviderBaseTestCase()
-
-
Method Details
-
initXMLObjectProviderTestingSupprt
Init testing fields.- Throws:
Exception- on error
-
testSingleElementUnmarshall
public abstract void testSingleElementUnmarshall()Tests unmarshalling a document that contains a single element (no children) with no optional attributes. -
testSingleElementOptionalAttributesUnmarshall
public void testSingleElementOptionalAttributesUnmarshall()Tests unmarshalling a document that contains a single element (no children) with all that element's optional attributes. -
testSingleElementUnknownAttributesUnmarshall
public void testSingleElementUnknownAttributesUnmarshall()Tests unmarshalling a document that contains a single element (no children) with all that element's optional attributes. -
testChildElementsUnmarshall
public void testChildElementsUnmarshall()Tests unmarshalling a document that contains a single element with children. -
testSingleElementMarshall
public abstract void testSingleElementMarshall()Tests marshalling the contents of a single element, with no optional attributes, to a DOM document. -
testSingleElementOptionalAttributesMarshall
public void testSingleElementOptionalAttributesMarshall()Tests marshalling the contents of a single element, with all optional attributes, to a DOM document. -
testSingleElementUnknownAttributesMarshall
public void testSingleElementUnknownAttributesMarshall()Tests marshalling the contents of a single element, some unknown attributes, to a DOM document. -
testChildElementsMarshall
public void testChildElementsMarshall()Tests marshalling the contents of a single element with child elements to a DOM document. -
testAttributeIDnessMarshall
public void testAttributeIDnessMarshall(@Nonnull XMLObject target, String idValue) throws MarshallingException, XMLParserException Test marshalling of attribute IDness.- Parameters:
target- target objectidValue- ID value- Throws:
MarshallingExceptionXMLParserException
-