[java-opensaml] branch main updated: Fix tests.

Scott Cantor cantor.2 at osu.edu
Thu Apr 13 19:37:03 UTC 2023


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

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

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

The following commit(s) were added to refs/heads/main by this push:
     new ea84853e1 Fix tests.
ea84853e1 is described below

commit ea84853e178d8c11a58827d138643a9ba727a9d0
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Apr 13 15:37:00 2023 -0400

    Fix tests.
---
 .../http/impl/HttpClientResponseSOAP11DecoderTest.java  | 14 +++++++++++---
 .../soap11/decoder/http/impl/HTTPSOAP11DecoderTest.java | 17 +++++++++++++----
 2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/decoder/http/impl/HttpClientResponseSOAP11DecoderTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/decoder/http/impl/HttpClientResponseSOAP11DecoderTest.java
index c1699e01d..75c1bdc6d 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/decoder/http/impl/HttpClientResponseSOAP11DecoderTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/decoder/http/impl/HttpClientResponseSOAP11DecoderTest.java
@@ -38,12 +38,14 @@ import org.opensaml.core.xml.util.XMLObjectSupport;
 import org.opensaml.messaging.context.MessageContext;
 import org.opensaml.messaging.decoder.MessageDecodingException;
 import org.opensaml.messaging.handler.AbstractMessageHandler;
+import org.opensaml.messaging.handler.MessageHandler;
 import org.opensaml.messaging.handler.MessageHandlerException;
 import org.opensaml.soap.common.SOAP11FaultDecodingException;
 import org.opensaml.soap.messaging.context.SOAP11Context;
 import org.opensaml.soap.soap11.Body;
 import org.opensaml.soap.soap11.Envelope;
 import org.opensaml.soap.soap11.Fault;
+import org.opensaml.soap.soap11.decoder.http.impl.HTTPSOAP11DecoderTest.TestEnvelopeBodyHandler;
 import org.opensaml.soap.util.SOAPSupport;
 import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
@@ -69,7 +71,9 @@ public class HttpClientResponseSOAP11DecoderTest extends XMLObjectBaseTestCase {
         body.getUnknownXMLObjects().add(buildXMLObject(simpleXMLObjectQName));
         final ClassicHttpResponse httpResponse = buildResponse(HttpStatus.SC_OK, envelope);
         
-        decoder.setBodyHandler(new TestPayloadBodyHandler());
+        final MessageHandler handler = new TestPayloadBodyHandler();
+        handler.initialize();
+        decoder.setBodyHandler(handler);
         decoder.setHttpResponse(httpResponse);
         decoder.initialize();
         
@@ -94,7 +98,9 @@ public class HttpClientResponseSOAP11DecoderTest extends XMLObjectBaseTestCase {
         body.getUnknownXMLObjects().add(buildXMLObject(simpleXMLObjectQName));
         final ClassicHttpResponse httpResponse = buildResponse(HttpStatus.SC_OK, envelope);
         
-        decoder.setBodyHandler(new TestEnvelopeBodyHandler());
+        final MessageHandler handler = new TestEnvelopeBodyHandler();
+        handler.initialize();
+        decoder.setBodyHandler(handler);
         decoder.setHttpResponse(httpResponse);
         decoder.initialize();
         
@@ -121,7 +127,9 @@ public class HttpClientResponseSOAP11DecoderTest extends XMLObjectBaseTestCase {
         body.getUnknownXMLObjects().add(fault);
         final ClassicHttpResponse httpResponse = buildResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR, envelope);
         
-        decoder.setBodyHandler(new TestPayloadBodyHandler());
+        final MessageHandler handler = new TestPayloadBodyHandler();
+        handler.initialize();
+        decoder.setBodyHandler(handler);
         decoder.setHttpResponse(httpResponse);
         decoder.initialize();
         
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/impl/HTTPSOAP11DecoderTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/impl/HTTPSOAP11DecoderTest.java
index 3acc6d9ac..60aa93fc0 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/impl/HTTPSOAP11DecoderTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/impl/HTTPSOAP11DecoderTest.java
@@ -26,6 +26,7 @@ import org.opensaml.core.xml.schema.XSAny;
 import org.opensaml.messaging.context.MessageContext;
 import org.opensaml.messaging.decoder.MessageDecodingException;
 import org.opensaml.messaging.handler.AbstractMessageHandler;
+import org.opensaml.messaging.handler.MessageHandler;
 import org.opensaml.messaging.handler.MessageHandlerException;
 import org.opensaml.soap.messaging.context.SOAP11Context;
 import org.opensaml.soap.soap11.Body;
@@ -72,7 +73,9 @@ public class HTTPSOAP11DecoderTest extends XMLObjectBaseTestCase {
     public void testDecodeToEnvelope() throws ComponentInitializationException, MessageDecodingException, IOException {
         httpRequest.setContent(getServletRequestContent("/org/opensaml/soap/soap11/SOAPNoHeaders.xml"));
         
-        decoder.setBodyHandler(new TestEnvelopeBodyHandler());
+        final MessageHandler handler = new TestEnvelopeBodyHandler();
+        handler.initialize();
+        decoder.setBodyHandler(handler);
         decoder.initialize();
         
         decoder.decode();
@@ -94,7 +97,9 @@ public class HTTPSOAP11DecoderTest extends XMLObjectBaseTestCase {
     public void testDecodeToPayload() throws ComponentInitializationException, MessageDecodingException, IOException {
         httpRequest.setContent(getServletRequestContent("/org/opensaml/soap/soap11/SOAPNoHeaders.xml"));
         
-        decoder.setBodyHandler(new TestPayloadBodyHandler());
+        final MessageHandler handler = new TestPayloadBodyHandler();
+        handler.initialize();
+        decoder.setBodyHandler(handler);
         decoder.initialize();
         
         decoder.decode();
@@ -118,7 +123,9 @@ public class HTTPSOAP11DecoderTest extends XMLObjectBaseTestCase {
         
         httpRequest.setContentType(null);
         
-        decoder.setBodyHandler(new TestEnvelopeBodyHandler());
+        final MessageHandler handler = new TestEnvelopeBodyHandler();
+        handler.initialize();
+        decoder.setBodyHandler(handler);
         decoder.initialize();
         
         decoder.decode();
@@ -137,7 +144,9 @@ public class HTTPSOAP11DecoderTest extends XMLObjectBaseTestCase {
         
         httpRequest.setContentType("application/x-www-form-urlencoded");
         
-        decoder.setBodyHandler(new TestEnvelopeBodyHandler());
+        final MessageHandler handler = new TestEnvelopeBodyHandler();
+        handler.initialize();
+        decoder.setBodyHandler(handler);
         decoder.initialize();
         
         decoder.decode();

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


More information about the commits mailing list