[java-opensaml] branch master updated: Add a testing hook for testing invalid content.

Scott Cantor cantor.2 at osu.edu
Thu Nov 21 10:37:59 EST 2019


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=23f0dec984e7f0499e920addd8ed79b858069ab8

The following commit(s) were added to refs/heads/master by this push:
       new  23f0dec   Add a testing hook for testing invalid content.
23f0dec is described below

commit 23f0dec984e7f0499e920addd8ed79b858069ab8
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Nov 21 10:37:56 2019 -0500

    Add a testing hook for testing invalid content.
---
 .../opensaml/core/xml/XMLObjectProviderBaseTestCase.java    | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java b/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java
index 0cd099e..944b4a3 100644
--- a/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java
+++ b/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectProviderBaseTestCase.java
@@ -40,6 +40,9 @@ public abstract class XMLObjectProviderBaseTestCase extends XMLObjectBaseTestCas
 
     /** Location of file containing a single element with child elements */
     protected String childElementsFile;
+    
+    /** Location of file containing some kind of invalid content. */
+    protected String invalidFile;
 
     /** The expected result of a marshalled single element with no optional attributes */
     protected Document expectedDOM;
@@ -52,6 +55,9 @@ public abstract class XMLObjectProviderBaseTestCase extends XMLObjectBaseTestCas
 
     /** The expected result of a marshalled single element with child elements */
     protected Document expectedChildElementsDOM;
+    
+    /** The result of parsing the invalid file. */
+    protected Document invalidDOM;
 
     @BeforeClass
 	protected void initXMLObjectProviderTestingSupprt() throws Exception {
@@ -74,6 +80,11 @@ public abstract class XMLObjectProviderBaseTestCase extends XMLObjectBaseTestCas
             expectedUnknownAttributesDOM = parserPool.parse(XMLObjectProviderBaseTestCase.class
                     .getResourceAsStream(singleElementUnknownAttributesFile));
         }
+        
+        if (invalidFile != null) {
+            invalidDOM = parserPool.parse(XMLObjectProviderBaseTestCase.class
+                    .getResourceAsStream(invalidFile));
+        }
     }
 
     /**
@@ -136,6 +147,4 @@ public abstract class XMLObjectProviderBaseTestCase extends XMLObjectBaseTestCas
         Assert.assertNull(expectedChildElementsDOM, "No testSingleElementChildElementsMarshall");
     }
     
-    
-
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list