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
-
public abstract class XMLObjectProviderBaseTestCase extends XMLObjectBaseTestCase
Base test case forXMLObjects 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
Fields Modifier and Type Field Description protected StringchildElementsFileLocation of file containing a single element with child elementsprotected DocumentexpectedChildElementsDOMThe expected result of a marshalled single element with child elementsprotected DocumentexpectedDOMThe expected result of a marshalled single element with no optional attributesprotected DocumentexpectedOptionalAttributesDOMThe expected result of a marshalled single element with all optional attributesprotected DocumentexpectedUnknownAttributesDOMThe expected result of a marshalled single element some unknown attributesprotected DocumentinvalidDOMThe result of parsing the invalid file.protected StringinvalidFileLocation of file containing some kind of invalid content.protected StringsingleElementFileLocation of file containing a single element with NO optional attributesprotected StringsingleElementOptionalAttributesFileLocation of file containing a single element with all optional attributesprotected StringsingleElementUnknownAttributesFileLocation 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 Constructor Description XMLObjectProviderBaseTestCase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidinitXMLObjectProviderTestingSupprt()voidtestAttributeIDnessMarshall(XMLObject target, String idValue)Test marshalling of attribute IDness.voidtestChildElementsMarshall()Tests marshalling the contents of a single element with child elements to a DOM document.voidtestChildElementsUnmarshall()Tests unmarshalling a document that contains a single element with children.abstract voidtestSingleElementMarshall()Tests marshalling the contents of a single element, with no optional attributes, to a DOM document.voidtestSingleElementOptionalAttributesMarshall()Tests marshalling the contents of a single element, with all optional attributes, to a DOM document.voidtestSingleElementOptionalAttributesUnmarshall()Tests unmarshalling a document that contains a single element (no children) with all that element's optional attributes.voidtestSingleElementUnknownAttributesMarshall()Tests marshalling the contents of a single element, some unknown attributes, to a DOM document.voidtestSingleElementUnknownAttributesUnmarshall()Tests unmarshalling a document that contains a single element (no children) with all that element's optional attributes.abstract voidtestSingleElementUnmarshall()Tests 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, unmarshallElement
-
Methods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
-
-
-
Field Detail
-
singleElementFile
protected String singleElementFile
Location of file containing a single element with NO optional attributes
-
singleElementOptionalAttributesFile
protected String singleElementOptionalAttributesFile
Location of file containing a single element with all optional attributes
-
singleElementUnknownAttributesFile
protected String singleElementUnknownAttributesFile
Location of file containing a single element with some unknown attributes
-
childElementsFile
protected String childElementsFile
Location of file containing a single element with child elements
-
invalidFile
protected String invalidFile
Location of file containing some kind of invalid content.
-
expectedDOM
protected Document expectedDOM
The expected result of a marshalled single element with no optional attributes
-
expectedOptionalAttributesDOM
protected Document expectedOptionalAttributesDOM
The expected result of a marshalled single element with all optional attributes
-
expectedUnknownAttributesDOM
protected Document expectedUnknownAttributesDOM
The expected result of a marshalled single element some unknown attributes
-
expectedChildElementsDOM
protected Document expectedChildElementsDOM
The expected result of a marshalled single element with child elements
-
invalidDOM
protected Document invalidDOM
The result of parsing the invalid file.
-
-
Method Detail
-
initXMLObjectProviderTestingSupprt
@BeforeClass protected void initXMLObjectProviderTestingSupprt() throws Exception- Throws:
Exception
-
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(XMLObject target, String idValue) throws MarshallingException, XMLParserException
Test marshalling of attribute IDness.
-
-