This is an automated email from the ASF dual-hosted git repository.

veithen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-axiom.git


The following commit(s) were added to refs/heads/master by this push:
     new 0a8a6ca7e Refactor SpringWSTestSuiteBuilder to use a loop over 
SOAPSpec instances
0a8a6ca7e is described below

commit 0a8a6ca7e79ac0dbc28d616bb021ae18743a0ba0
Author: Andreas Veithen-Knowles <[email protected]>
AuthorDate: Wed Mar 11 23:12:02 2026 +0000

    Refactor SpringWSTestSuiteBuilder to use a loop over SOAPSpec instances
---
 .../ts/springws/SpringWSTestSuiteBuilder.java      | 37 ++++++++++------------
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git 
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestSuiteBuilder.java
 
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestSuiteBuilder.java
index ab9cea000..e02103e16 100644
--- 
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestSuiteBuilder.java
+++ 
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestSuiteBuilder.java
@@ -18,6 +18,7 @@
  */
 package org.apache.axiom.ts.springws;
 
+import org.apache.axiom.testing.multiton.Multiton;
 import org.apache.axiom.testutils.suite.MatrixTestSuiteBuilder;
 import org.apache.axiom.ts.soap.SOAPSpec;
 import org.apache.axiom.ts.springws.scenario.ScenarioConfig;
@@ -46,31 +47,27 @@ public class SpringWSTestSuiteBuilder extends 
MatrixTestSuiteBuilder {
 
     @Override
     protected void addTests() {
-        addSimpleTests(messageFactoryConfigurator, SOAPSpec.SOAP11);
-        addSimpleTests(messageFactoryConfigurator, SOAPSpec.SOAP12);
         addTest(new 
TestCreateWebServiceMessageFromInputStreamMTOM(messageFactoryConfigurator));
-        addScenarioTests(
-                new ScenarioConfig(altMessageFactoryConfigurator, 
messageFactoryConfigurator),
-                SOAPSpec.SOAP11);
-        addScenarioTests(
-                new ScenarioConfig(altMessageFactoryConfigurator, 
messageFactoryConfigurator),
-                SOAPSpec.SOAP12);
-        if (altMessageFactoryConfigurator != messageFactoryConfigurator) {
+        for (SOAPSpec spec : Multiton.getInstances(SOAPSpec.class)) {
+            addTest(new 
TestCreateWebServiceMessage(messageFactoryConfigurator, spec));
+            addTest(
+                    new TestCreateWebServiceMessageFromInputStream(
+                            messageFactoryConfigurator, spec));
+            addTest(
+                    new 
TestCreateWebServiceMessageFromInputStreamVersionMismatch(
+                            messageFactoryConfigurator, spec));
             addScenarioTests(
-                    new ScenarioConfig(messageFactoryConfigurator, 
altMessageFactoryConfigurator),
-                    SOAPSpec.SOAP11);
-            addScenarioTests(
-                    new ScenarioConfig(messageFactoryConfigurator, 
altMessageFactoryConfigurator),
-                    SOAPSpec.SOAP12);
+                    new ScenarioConfig(altMessageFactoryConfigurator, 
messageFactoryConfigurator),
+                    spec);
+            if (altMessageFactoryConfigurator != messageFactoryConfigurator) {
+                addScenarioTests(
+                        new ScenarioConfig(
+                                messageFactoryConfigurator, 
altMessageFactoryConfigurator),
+                        spec);
+            }
         }
     }
 
-    private void addSimpleTests(MessageFactoryConfigurator mfc, SOAPSpec spec) 
{
-        addTest(new TestCreateWebServiceMessage(mfc, spec));
-        addTest(new TestCreateWebServiceMessageFromInputStream(mfc, spec));
-        addTest(new 
TestCreateWebServiceMessageFromInputStreamVersionMismatch(mfc, spec));
-    }
-
     private void addScenarioTests(ScenarioConfig config, SOAPSpec spec) {
         addTest(new ClientServerTest(config, spec));
         addTest(new WSAddressingDOMTest(config, spec));

Reply via email to