edu.internet2.middleware.shibboleth.common.xmlobject
Class BaseShibObjectProviderTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.custommonkey.xmlunit.XMLTestCase
              extended by edu.internet2.middleware.shibboleth.common.TestCaseBase
                  extended by edu.internet2.middleware.shibboleth.common.xmlobject.BaseShibObjectProviderTestCase
All Implemented Interfaces:
junit.framework.Test, org.custommonkey.xmlunit.XMLConstants, org.custommonkey.xmlunit.XSLTConstants
Direct Known Subclasses:
ShibMDKeyAuthorityTest, ShibMDScopeTest, ShibScopedValueTest

public abstract class BaseShibObjectProviderTestCase
extends TestCaseBase

Base abstract class for testing object providers.


Field Summary
protected  String childElementsFile
          Location of file containing a single element with child elements.
static String DATA_PATH
          Base path for data files.
protected  Document expectedChildElementsDOM
          The expected result of a marshalled single element with child elements.
protected  Document expectedDOM
          The expected result of a marshalled single element with no optional attributes.
protected  Document expectedOptionalAttributesDOM
          The expected result of a marshalled single element with all optional attributes.
protected  String singleElementFile
          Location of file containing a single element with NO optional attributes.
protected  String singleElementOptionalAttributesFile
          Location of file containing a single element with all optional attributes.
 
Fields inherited from class edu.internet2.middleware.shibboleth.common.TestCaseBase
builderFactory, marshallerFactory, parser, unmarshallerFactory
 
Fields inherited from interface org.custommonkey.xmlunit.XSLTConstants
JAVA5_XSLTC_FACTORY_NAME, XSLT_END, XSLT_IDENTITY_TEMPLATE, XSLT_START, XSLT_START_NO_VERSION, XSLT_STRIP_COMMENTS_TEMPLATE, XSLT_STRIP_WHITESPACE, XSLT_XML_OUTPUT_NOINDENT
 
Fields inherited from interface org.custommonkey.xmlunit.XMLConstants
CLOSE_NODE, END_CDATA, END_COMMENT, END_PROCESSING_INSTRUCTION, OPEN_END_NODE, OPEN_START_NODE, START_CDATA, START_COMMENT, START_DOCTYPE, START_PROCESSING_INSTRUCTION, W3C_XML_SCHEMA_INSTANCE_NO_NAMESPACE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_INSTANCE_NS_URI, W3C_XML_SCHEMA_INSTANCE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_NS_URI, XML_DECLARATION, XMLNS_PREFIX, XPATH_ATTRIBUTE_IDENTIFIER, XPATH_CHARACTER_NODE_IDENTIFIER, XPATH_COMMENT_IDENTIFIER, XPATH_NODE_INDEX_END, XPATH_NODE_INDEX_START, XPATH_PROCESSING_INSTRUCTION_IDENTIFIER, XPATH_SEPARATOR
 
Constructor Summary
BaseShibObjectProviderTestCase()
           
 
Method Summary
 XMLObject buildXMLObject(QName objectQName)
          Builds the requested XMLObject.
protected  void setUp()
          
 void testChildElementsMarshall()
          Tests marshalling the contents of a single element with child elements to a DOM document.
 void testChildElementsUnmarshall()
          Tests unmarshalling a document that contains a single element with children.
abstract  void testSingleElementMarshall()
          Tests marshalling the contents of a single element, with no optional attributes, to a DOM document.
 void testSingleElementOptionalAttributesMarshall()
          Tests marshalling the contents of a single element, with all optional attributes, to a DOM document.
 void testSingleElementOptionalAttributesUnmarshall()
          Tests unmarshalling a document that contains a single element (no children) with all that element's optional attributes.
abstract  void testSingleElementUnmarshall()
          Tests unmarshalling a document that contains a single element (no children) with no optional attributes.
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.TestCaseBase
assertEquals, assertEquals, unmarshallElement
 
Methods inherited from class org.custommonkey.xmlunit.XMLTestCase
assertNodeTestPasses, assertNodeTestPasses, assertNodeTestPasses, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLIdentical, assertXMLIdentical, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXpathEvaluatesTo, assertXpathEvaluatesTo, assertXpathEvaluatesTo, assertXpathExists, assertXpathExists, assertXpathExists, assertXpathNotExists, assertXpathNotExists, assertXpathNotExists, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, compareXML, compareXML, compareXML, compareXML, compareXML, compareXML
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_PATH

public static final String DATA_PATH
Base path for data files.

See Also:
Constant Field Values

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.


childElementsFile

protected String childElementsFile
Location of file containing a single element with child elements.


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.


expectedChildElementsDOM

protected Document expectedChildElementsDOM
The expected result of a marshalled single element with child elements.

Constructor Detail

BaseShibObjectProviderTestCase

public BaseShibObjectProviderTestCase()
Method Detail

buildXMLObject

public XMLObject buildXMLObject(QName objectQName)
Builds the requested XMLObject.

Parameters:
objectQName - name of the XMLObject
Returns:
the build XMLObject

setUp

protected void setUp()
              throws Exception

Overrides:
setUp in class TestCaseBase
Throws:
Exception

testChildElementsMarshall

public void testChildElementsMarshall()
Tests marshalling the contents of a single element with child elements to a DOM document.


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.


testSingleElementOptionalAttributesUnmarshall

public void testSingleElementOptionalAttributesUnmarshall()
Tests unmarshalling a document that contains a single element (no children) with all that element's optional attributes.


testSingleElementUnmarshall

public abstract void testSingleElementUnmarshall()
Tests unmarshalling a document that contains a single element (no children) with no optional attributes.



Copyright © 1999-2012. All Rights Reserved.