[java-opensaml COMMIT] /trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java
noreply at shibboleth.net
noreply at shibboleth.net
Thu Jun 7 11:04:41 BST 2012
Author: rdw
Date: Thu Jun 7 11:04:41 2012
New Revision: 3059
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3059&view=rev
Log:
Support for unknown attribute tests
Modified:
trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java
Modified: trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java?rev=3059&r1=3058&r2=3059&view=diff
==============================================================================
--- trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java (original)
+++ trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java Thu Jun 7 11:04:41 2012
@@ -35,6 +35,9 @@
/** Location of file containing a single element with all optional attributes */
protected String singleElementOptionalAttributesFile;
+ /** Location of file containing a single element with some unknown attributes */
+ protected String singleElementUnknownAttributesFile;
+
/** Location of file containing a single element with child elements */
protected String childElementsFile;
@@ -43,6 +46,9 @@
/** The expected result of a marshalled single element with all optional attributes */
protected Document expectedOptionalAttributesDOM;
+
+ /** The expected result of a marshalled single element some unknown attributes */
+ protected Document expectedUnknownAttributesDOM;
/** The expected result of a marshalled single element with child elements */
protected Document expectedChildElementsDOM;
@@ -64,6 +70,11 @@
expectedChildElementsDOM = parserPool.parse(XMLObjectProviderBaseTestCase.class
.getResourceAsStream(childElementsFile));
}
+
+ if (singleElementUnknownAttributesFile != null) {
+ expectedUnknownAttributesDOM = parserPool.parse(XMLObjectProviderBaseTestCase.class
+ .getResourceAsStream(singleElementUnknownAttributesFile));
+ }
}
/**
@@ -78,6 +89,15 @@
@Test
public void testSingleElementOptionalAttributesUnmarshall() {
Assert.assertNull(singleElementOptionalAttributesFile, "No testSingleElementOptionalAttributesUnmarshall present");
+ }
+
+ /**
+ * Tests unmarshalling a document that contains a single element (no children) with all that element's optional
+ * attributes.
+ */
+ @Test
+ public void testSingleElementUnknownAttributesUnmarshall() {
+ Assert.assertNull(singleElementUnknownAttributesFile, "No testSingleElementUnknownAttributesUnmarshall present");
}
/**
@@ -102,11 +122,21 @@
}
/**
+ * Tests marshalling the contents of a single element, some unknown attributes, to a DOM document.
+ */
+ @Test
+ public void testSingleElementUnknownAttributesMarshall() {
+ Assert.assertNull(expectedUnknownAttributesDOM, "No testSingleUnknownAttributesMarshall");
+ }
+
+ /**
* Tests marshalling the contents of a single element with child elements to a DOM document.
*/
@Test
public void testChildElementsMarshall() {
Assert.assertNull(expectedChildElementsDOM, "No testSingleElementChildElementsMarshall");
}
+
+
}
More information about the commits
mailing list