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 589126a65 Migrate spring-ws-testsuite from MatrixTestSuiteBuilder to
MatrixTestNode
589126a65 is described below
commit 589126a653a43608e74ca26486d6e93bbff81d0a
Author: Andreas Veithen-Knowles <[email protected]>
AuthorDate: Fri Mar 13 23:03:32 2026 +0000
Migrate spring-ws-testsuite from MatrixTestSuiteBuilder to MatrixTestNode
---
systests/spring-ws-tests/pom.xml | 5 +
.../axiom/systest/springws/SpringWSTest.java | 27 +++---
testing/spring-ws-testsuite/pom.xml | 13 ++-
.../ts/springws/MatrixTestCasePropertySource.java | 35 -------
.../apache/axiom/ts/springws/SimpleTestCase.java | 10 +-
.../apache/axiom/ts/springws/SpringWSTestCase.java | 23 +++--
.../axiom/ts/springws/SpringWSTestSuite.java | 107 +++++++++++++++++++++
.../ts/springws/SpringWSTestSuiteBuilder.java | 80 ---------------
.../ts/springws/scenario/ScenarioTestCase.java | 11 +--
.../scenario/broker/BrokerScenarioTest.java | 6 --
.../ts/springws/scenario/jaxb2/JAXB2Test.java | 6 --
.../springws/scenario/jdom/ClientServerTest.java | 6 --
.../scenario/secureecho/SecureEchoTest.java | 6 --
.../scenario/soapaction/SoapActionTest.java | 6 --
.../scenario/validation/ValidationTest.java | 6 --
.../scenario/wsadom/WSAddressingDOMTest.java | 6 --
.../TestCreateWebServiceMessage.java | 6 --
...TestCreateWebServiceMessageFromInputStream.java | 7 --
...CreateWebServiceMessageFromInputStreamMTOM.java | 6 --
...rviceMessageFromInputStreamVersionMismatch.java | 7 --
.../org/apache/axiom/ts/springws/SpringWSTest.java | 17 ++--
21 files changed, 163 insertions(+), 233 deletions(-)
diff --git a/systests/spring-ws-tests/pom.xml b/systests/spring-ws-tests/pom.xml
index 5b6d0f870..13061f0cb 100644
--- a/systests/spring-ws-tests/pom.xml
+++ b/systests/spring-ws-tests/pom.xml
@@ -66,6 +66,11 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-ws-testsuite</artifactId>
diff --git
a/systests/spring-ws-tests/src/test/java/org/apache/axiom/systest/springws/SpringWSTest.java
b/systests/spring-ws-tests/src/test/java/org/apache/axiom/systest/springws/SpringWSTest.java
index b730de806..eace47cd7 100644
---
a/systests/spring-ws-tests/src/test/java/org/apache/axiom/systest/springws/SpringWSTest.java
+++
b/systests/spring-ws-tests/src/test/java/org/apache/axiom/systest/springws/SpringWSTest.java
@@ -18,22 +18,25 @@
*/
package org.apache.axiom.systest.springws;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import java.util.stream.Stream;
+import org.apache.axiom.testutils.suite.MatrixTestFilters;
import org.apache.axiom.ts.springws.MessageFactoryConfigurator;
-import org.apache.axiom.ts.springws.SpringWSTestSuiteBuilder;
+import org.apache.axiom.ts.springws.SpringWSTestSuite;
import
org.apache.axiom.ts.springws.soap.messagefactory.TestCreateWebServiceMessageFromInputStreamVersionMismatch;
+import org.junit.jupiter.api.DynamicNode;
+import org.junit.jupiter.api.TestFactory;
-public class SpringWSTest extends TestCase {
- public static TestSuite suite() {
- SpringWSTestSuiteBuilder builder =
- new SpringWSTestSuiteBuilder(
- new AxiomMessageFactoryConfigurator(),
MessageFactoryConfigurator.SAAJ);
-
+public class SpringWSTest {
+ @TestFactory
+ public Stream<DynamicNode> tests() {
// Since Spring-WS 3.1.4, the behavior differs between the Axiom and
SAAJ implementations.
-
builder.exclude(TestCreateWebServiceMessageFromInputStreamVersionMismatch.class);
-
- return builder.build();
+ MatrixTestFilters excludes =
+ MatrixTestFilters.builder()
+
.add(TestCreateWebServiceMessageFromInputStreamVersionMismatch.class)
+ .build();
+ return SpringWSTestSuite.create(
+ new AxiomMessageFactoryConfigurator(),
MessageFactoryConfigurator.SAAJ)
+ .toDynamicNodes(excludes);
}
}
diff --git a/testing/spring-ws-testsuite/pom.xml
b/testing/spring-ws-testsuite/pom.xml
index 3b1b6f279..6e5f21c4a 100644
--- a/testing/spring-ws-testsuite/pom.xml
+++ b/testing/spring-ws-testsuite/pom.xml
@@ -117,6 +117,14 @@
<artifactId>auto-service-annotations</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
@@ -132,11 +140,6 @@
<artifactId>log4j-core</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/MatrixTestCasePropertySource.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/MatrixTestCasePropertySource.java
deleted file mode 100644
index a2b5ed52f..000000000
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/MatrixTestCasePropertySource.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.axiom.ts.springws;
-
-import org.apache.axiom.testutils.suite.MatrixTestCase;
-import org.springframework.core.env.PropertySource;
-
-public class MatrixTestCasePropertySource extends
PropertySource<MatrixTestCase> {
- public static final String TEST_PARAMETERS_PROPERTY_SOURCE_NAME =
"testParameters";
-
- public MatrixTestCasePropertySource(MatrixTestCase source) {
- super(TEST_PARAMETERS_PROPERTY_SOURCE_NAME, source);
- }
-
- @Override
- public Object getProperty(String name) {
- return source.getTestParameters().get(name);
- }
-}
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SimpleTestCase.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SimpleTestCase.java
index ccfe17438..14f20793f 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SimpleTestCase.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SimpleTestCase.java
@@ -18,17 +18,13 @@
*/
package org.apache.axiom.ts.springws;
-import org.apache.axiom.ts.soap.SOAPSpec;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.ws.soap.SoapMessageFactory;
-public abstract class SimpleTestCase extends SpringWSTestCase {
- private final MessageFactoryConfigurator mfc;
+import com.google.inject.Inject;
- public SimpleTestCase(MessageFactoryConfigurator mfc, SOAPSpec spec) {
- super(spec);
- this.mfc = mfc;
- }
+public abstract class SimpleTestCase extends SpringWSTestCase {
+ @Inject private MessageFactoryConfigurator mfc;
@Override
protected final void runTest() throws Throwable {
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestCase.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestCase.java
index af4a132d9..129677e1d 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestCase.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestCase.java
@@ -18,28 +18,31 @@
*/
package org.apache.axiom.ts.springws;
-import org.apache.axiom.testutils.suite.MatrixTestCase;
import org.apache.axiom.ts.soap.SOAPSpec;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
+import org.springframework.mock.env.MockPropertySource;
-public abstract class SpringWSTestCase extends MatrixTestCase {
- protected final SOAPSpec spec;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
- public SpringWSTestCase(SOAPSpec spec) {
- this.spec = spec;
- addTestParameter("soapVersion",
spec.getAdapter(SOAPSpecAdapter.class).getSoapVersion());
- }
+import junit.framework.TestCase;
+
+public abstract class SpringWSTestCase extends TestCase {
+ @Inject
+ @Named("soapVersion")
+ protected SOAPSpec spec;
protected void configureContext(
GenericApplicationContext context,
MessageFactoryConfigurator messageFactoryConfigurator,
Resource configResource) {
- context.getEnvironment()
- .getPropertySources()
- .addFirst(new MatrixTestCasePropertySource(this));
+ MockPropertySource propertySource = new
MockPropertySource("testParameters");
+ propertySource.setProperty(
+ "soapVersion",
spec.getAdapter(SOAPSpecAdapter.class).getSoapVersion());
+ context.getEnvironment().getPropertySources().addFirst(propertySource);
messageFactoryConfigurator.configure(context);
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
reader.loadBeanDefinitions(new ClassPathResource("common.xml",
SpringWSTestCase.class));
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestSuite.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestSuite.java
new file mode 100644
index 000000000..0ad39621a
--- /dev/null
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestSuite.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.springws;
+
+import org.apache.axiom.testing.multiton.Multiton;
+import org.apache.axiom.testutils.suite.DimensionFanOutNode;
+import org.apache.axiom.testutils.suite.InjectorNode;
+import org.apache.axiom.testutils.suite.MatrixTest;
+import org.apache.axiom.testutils.suite.MatrixTestNode;
+import org.apache.axiom.testutils.suite.ParameterFanOutNode;
+import org.apache.axiom.testutils.suite.ParentNode;
+import org.apache.axiom.ts.soap.SOAPSpec;
+import org.apache.axiom.ts.springws.scenario.ScenarioConfig;
+import org.apache.axiom.ts.springws.scenario.broker.BrokerScenarioTest;
+import org.apache.axiom.ts.springws.scenario.jaxb2.JAXB2Test;
+import org.apache.axiom.ts.springws.scenario.jdom.ClientServerTest;
+import org.apache.axiom.ts.springws.scenario.secureecho.SecureEchoTest;
+import org.apache.axiom.ts.springws.scenario.soapaction.SoapActionTest;
+import org.apache.axiom.ts.springws.scenario.validation.ValidationTest;
+import org.apache.axiom.ts.springws.scenario.wsadom.WSAddressingDOMTest;
+import
org.apache.axiom.ts.springws.soap.messagefactory.TestCreateWebServiceMessage;
+import
org.apache.axiom.ts.springws.soap.messagefactory.TestCreateWebServiceMessageFromInputStream;
+import
org.apache.axiom.ts.springws.soap.messagefactory.TestCreateWebServiceMessageFromInputStreamMTOM;
+import
org.apache.axiom.ts.springws.soap.messagefactory.TestCreateWebServiceMessageFromInputStreamVersionMismatch;
+
+import com.google.common.collect.ImmutableList;
+import com.google.inject.AbstractModule;
+import com.google.inject.name.Names;
+
+public class SpringWSTestSuite {
+ public static MatrixTestNode create(
+ MessageFactoryConfigurator messageFactoryConfigurator,
+ MessageFactoryConfigurator altMessageFactoryConfigurator) {
+ ImmutableList.Builder<ScenarioConfig> configs =
ImmutableList.builder();
+ configs.add(new ScenarioConfig(altMessageFactoryConfigurator,
messageFactoryConfigurator));
+ if (altMessageFactoryConfigurator != messageFactoryConfigurator) {
+ configs.add(
+ new ScenarioConfig(messageFactoryConfigurator,
altMessageFactoryConfigurator));
+ }
+
+ AbstractModule mfcModule =
+ new AbstractModule() {
+ @Override
+ protected void configure() {
+ bind(MessageFactoryConfigurator.class)
+ .toInstance(messageFactoryConfigurator);
+ }
+ };
+
+ return new ParentNode(
+ new InjectorNode(
+ ImmutableList.of(
+ mfcModule,
+ new AbstractModule() {
+ @Override
+ protected void configure() {
+ bind(SOAPSpec.class)
+
.annotatedWith(Names.named("soapVersion"))
+ .toInstance(SOAPSpec.SOAP12);
+ }
+ }),
+ new
MatrixTest(TestCreateWebServiceMessageFromInputStreamMTOM.class)),
+ new ParameterFanOutNode<>(
+ SOAPSpec.class,
+ Multiton.getInstances(SOAPSpec.class),
+ "soapVersion",
+ spec ->
spec.getAdapter(SOAPSpecAdapter.class).getSoapVersion(),
+ new ParentNode(
+ new InjectorNode(
+ mfcModule,
+ new ParentNode(
+ new
MatrixTest(TestCreateWebServiceMessage.class),
+ new MatrixTest(
+
TestCreateWebServiceMessageFromInputStream
+ .class),
+ new MatrixTest(
+
TestCreateWebServiceMessageFromInputStreamVersionMismatch
+ .class))),
+ new DimensionFanOutNode<>(
+ ScenarioConfig.class,
+ configs.build(),
+ new ParentNode(
+ new
MatrixTest(ClientServerTest.class),
+ new
MatrixTest(WSAddressingDOMTest.class),
+ new
MatrixTest(JAXB2Test.class),
+ new
MatrixTest(BrokerScenarioTest.class),
+ new
MatrixTest(ValidationTest.class),
+ new
MatrixTest(SecureEchoTest.class),
+ new
MatrixTest(SoapActionTest.class))))));
+ }
+}
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
deleted file mode 100644
index 00b5b898a..000000000
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/SpringWSTestSuiteBuilder.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.axiom.ts.springws;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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;
-import org.apache.axiom.ts.springws.scenario.broker.BrokerScenarioTest;
-import org.apache.axiom.ts.springws.scenario.jaxb2.JAXB2Test;
-import org.apache.axiom.ts.springws.scenario.jdom.ClientServerTest;
-import org.apache.axiom.ts.springws.scenario.secureecho.SecureEchoTest;
-import org.apache.axiom.ts.springws.scenario.soapaction.SoapActionTest;
-import org.apache.axiom.ts.springws.scenario.validation.ValidationTest;
-import org.apache.axiom.ts.springws.scenario.wsadom.WSAddressingDOMTest;
-import
org.apache.axiom.ts.springws.soap.messagefactory.TestCreateWebServiceMessage;
-import
org.apache.axiom.ts.springws.soap.messagefactory.TestCreateWebServiceMessageFromInputStream;
-import
org.apache.axiom.ts.springws.soap.messagefactory.TestCreateWebServiceMessageFromInputStreamMTOM;
-import
org.apache.axiom.ts.springws.soap.messagefactory.TestCreateWebServiceMessageFromInputStreamVersionMismatch;
-
-public class SpringWSTestSuiteBuilder extends MatrixTestSuiteBuilder {
- private final MessageFactoryConfigurator messageFactoryConfigurator;
- private final MessageFactoryConfigurator altMessageFactoryConfigurator;
-
- public SpringWSTestSuiteBuilder(
- MessageFactoryConfigurator messageFactoryConfigurator,
- MessageFactoryConfigurator altMessageFactoryConfigurator) {
- this.messageFactoryConfigurator = messageFactoryConfigurator;
- this.altMessageFactoryConfigurator = altMessageFactoryConfigurator;
- }
-
- @Override
- protected void addTests() {
- List<ScenarioConfig> configs = new ArrayList<>();
- configs.add(new ScenarioConfig(altMessageFactoryConfigurator,
messageFactoryConfigurator));
- if (altMessageFactoryConfigurator != messageFactoryConfigurator) {
- configs.add(
- new ScenarioConfig(messageFactoryConfigurator,
altMessageFactoryConfigurator));
- }
-
- addTest(new
TestCreateWebServiceMessageFromInputStreamMTOM(messageFactoryConfigurator));
- for (SOAPSpec spec : Multiton.getInstances(SOAPSpec.class)) {
- addTest(new
TestCreateWebServiceMessage(messageFactoryConfigurator, spec));
- addTest(
- new TestCreateWebServiceMessageFromInputStream(
- messageFactoryConfigurator, spec));
- addTest(
- new
TestCreateWebServiceMessageFromInputStreamVersionMismatch(
- messageFactoryConfigurator, spec));
- for (ScenarioConfig config : configs) {
- addTest(new ClientServerTest(config, spec));
- addTest(new WSAddressingDOMTest(config, spec));
- addTest(new JAXB2Test(config, spec));
- addTest(new BrokerScenarioTest(config, spec));
- addTest(new ValidationTest(config, spec));
- addTest(new SecureEchoTest(config, spec));
- addTest(new SoapActionTest(config, spec));
- }
- }
- }
-}
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/ScenarioTestCase.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/ScenarioTestCase.java
index 9c27c6929..5cc66e17e 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/ScenarioTestCase.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/ScenarioTestCase.java
@@ -18,7 +18,6 @@
*/
package org.apache.axiom.ts.springws.scenario;
-import org.apache.axiom.ts.soap.SOAPSpec;
import org.apache.axiom.ts.springws.SpringWSTestCase;
import org.eclipse.jetty.ee10.servlet.ServletContextHandler;
import org.eclipse.jetty.ee10.servlet.ServletHolder;
@@ -35,17 +34,13 @@ import org.springframework.mock.env.MockPropertySource;
import org.springframework.web.context.support.GenericWebApplicationContext;
import org.springframework.ws.transport.http.MessageDispatcherServlet;
+import com.google.inject.Inject;
+
public abstract class ScenarioTestCase extends SpringWSTestCase {
- private final ScenarioConfig config;
+ @Inject private ScenarioConfig config;
private Server server;
protected GenericXmlApplicationContext context;
- public ScenarioTestCase(ScenarioConfig config, SOAPSpec spec) {
- super(spec);
- this.config = config;
- config.addTestParameters(this);
- }
-
@Override
protected void setUp() throws Exception {
// Set up a custom thread pool to improve thread names (for logging
purposes)
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/broker/BrokerScenarioTest.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/broker/BrokerScenarioTest.java
index 45c094cd2..f19e9c7f1 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/broker/BrokerScenarioTest.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/broker/BrokerScenarioTest.java
@@ -25,8 +25,6 @@ import java.util.Locale;
import javax.xml.transform.Source;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.scenario.ScenarioConfig;
import org.apache.axiom.ts.springws.scenario.ScenarioTestCase;
import org.springframework.ws.server.endpoint.annotation.XPathParam;
import org.springframework.ws.soap.client.SoapFaultClientException;
@@ -44,10 +42,6 @@ import
org.springframework.ws.soap.client.SoapFaultClientException;
* </ul>
*/
public class BrokerScenarioTest extends ScenarioTestCase {
- public BrokerScenarioTest(ScenarioConfig config, SOAPSpec spec) {
- super(config, spec);
- }
-
@Override
protected void runTest() throws Throwable {
BrokerClient client = context.getBean(BrokerClient.class);
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/jaxb2/JAXB2Test.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/jaxb2/JAXB2Test.java
index faa72345e..c593359db 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/jaxb2/JAXB2Test.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/jaxb2/JAXB2Test.java
@@ -18,16 +18,10 @@
*/
package org.apache.axiom.ts.springws.scenario.jaxb2;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.scenario.ScenarioConfig;
import org.apache.axiom.ts.springws.scenario.ScenarioTestCase;
import org.springframework.ws.client.core.WebServiceTemplate;
public class JAXB2Test extends ScenarioTestCase {
- public JAXB2Test(ScenarioConfig config, SOAPSpec spec) {
- super(config, spec);
- }
-
@Override
protected void runTest() throws Throwable {
GetQuoteRequest request = new GetQuoteRequest();
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/jdom/ClientServerTest.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/jdom/ClientServerTest.java
index ec28af22c..21f242198 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/jdom/ClientServerTest.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/jdom/ClientServerTest.java
@@ -18,8 +18,6 @@
*/
package org.apache.axiom.ts.springws.scenario.jdom;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.scenario.ScenarioConfig;
import org.apache.axiom.ts.springws.scenario.ScenarioTestCase;
import org.jdom2.input.SAXBuilder;
import org.jdom2.transform.JDOMResult;
@@ -27,10 +25,6 @@ import org.jdom2.transform.JDOMSource;
import org.springframework.ws.client.core.WebServiceTemplate;
public class ClientServerTest extends ScenarioTestCase {
- public ClientServerTest(ScenarioConfig config, SOAPSpec spec) {
- super(config, spec);
- }
-
@Override
protected void runTest() throws Throwable {
JDOMSource source =
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/secureecho/SecureEchoTest.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/secureecho/SecureEchoTest.java
index f4725e8ac..e19892811 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/secureecho/SecureEchoTest.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/secureecho/SecureEchoTest.java
@@ -23,8 +23,6 @@ import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.dom.DOMSource;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.scenario.ScenarioConfig;
import org.apache.axiom.ts.springws.scenario.ScenarioTestCase;
import org.springframework.ws.client.core.WebServiceTemplate;
import org.springframework.ws.soap.client.core.SoapActionCallback;
@@ -32,10 +30,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class SecureEchoTest extends ScenarioTestCase {
- public SecureEchoTest(ScenarioConfig config, SOAPSpec spec) {
- super(config, spec);
- }
-
@Override
protected void runTest() throws Throwable {
DocumentBuilder documentBuilder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/soapaction/SoapActionTest.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/soapaction/SoapActionTest.java
index b24cc0bb0..0a123d4a8 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/soapaction/SoapActionTest.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/soapaction/SoapActionTest.java
@@ -23,8 +23,6 @@ import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.dom.DOMSource;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.scenario.ScenarioConfig;
import org.apache.axiom.ts.springws.scenario.ScenarioTestCase;
import org.springframework.ws.client.core.WebServiceTemplate;
import org.springframework.ws.soap.client.core.SoapActionCallback;
@@ -32,10 +30,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class SoapActionTest extends ScenarioTestCase {
- public SoapActionTest(ScenarioConfig config, SOAPSpec spec) {
- super(config, spec);
- }
-
@Override
protected void runTest() throws Throwable {
DocumentBuilder documentBuilder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/validation/ValidationTest.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/validation/ValidationTest.java
index a07405474..e77a33997 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/validation/ValidationTest.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/validation/ValidationTest.java
@@ -25,17 +25,11 @@ import java.util.Iterator;
import javax.xml.namespace.QName;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.scenario.ScenarioConfig;
import org.apache.axiom.ts.springws.scenario.ScenarioTestCase;
import org.springframework.ws.soap.SoapFaultDetailElement;
import org.springframework.ws.soap.client.SoapFaultClientException;
public class ValidationTest extends ScenarioTestCase {
- public ValidationTest(ScenarioConfig config, SOAPSpec spec) {
- super(config, spec);
- }
-
@Override
protected void runTest() throws Throwable {
StockQuoteClient client = context.getBean(StockQuoteClient.class);
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/wsadom/WSAddressingDOMTest.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/wsadom/WSAddressingDOMTest.java
index b3371dd42..fe4cc8ac9 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/wsadom/WSAddressingDOMTest.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/scenario/wsadom/WSAddressingDOMTest.java
@@ -23,8 +23,6 @@ import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.dom.DOMSource;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.scenario.ScenarioConfig;
import org.apache.axiom.ts.springws.scenario.ScenarioTestCase;
import org.springframework.ws.client.core.WebServiceTemplate;
import org.springframework.ws.soap.addressing.client.ActionCallback;
@@ -32,10 +30,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class WSAddressingDOMTest extends ScenarioTestCase {
- public WSAddressingDOMTest(ScenarioConfig config, SOAPSpec spec) {
- super(config, spec);
- }
-
@Override
protected void runTest() throws Throwable {
DocumentBuilder documentBuilder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessage.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessage.java
index 4cf1aab49..757cd6435 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessage.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessage.java
@@ -18,8 +18,6 @@
*/
package org.apache.axiom.ts.springws.soap.messagefactory;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.MessageFactoryConfigurator;
import org.apache.axiom.ts.springws.SimpleTestCase;
import org.springframework.ws.soap.SoapBody;
import org.springframework.ws.soap.SoapEnvelope;
@@ -32,10 +30,6 @@ import org.springframework.ws.soap.SoapMessageFactory;
* SoapMessageFactory#createWebServiceMessage()}.
*/
public class TestCreateWebServiceMessage extends SimpleTestCase {
- public TestCreateWebServiceMessage(MessageFactoryConfigurator mfc,
SOAPSpec spec) {
- super(mfc, spec);
- }
-
@Override
protected void runTest(SoapMessageFactory messageFactory) {
SoapMessage message = messageFactory.createWebServiceMessage();
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStream.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStream.java
index 24737c170..9a6e057c7 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStream.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStream.java
@@ -20,9 +20,7 @@ package org.apache.axiom.ts.springws.soap.messagefactory;
import java.io.InputStream;
-import org.apache.axiom.ts.soap.SOAPSpec;
import org.apache.axiom.ts.soap.SOAPSampleSet;
-import org.apache.axiom.ts.springws.MessageFactoryConfigurator;
import org.apache.axiom.ts.springws.SimpleTestCase;
import org.springframework.ws.soap.SoapEnvelope;
import org.springframework.ws.soap.SoapMessage;
@@ -33,11 +31,6 @@ import org.springframework.ws.soap.SoapMessageFactory;
* SoapMessageFactory#createWebServiceMessage(InputStream)}.
*/
public class TestCreateWebServiceMessageFromInputStream extends SimpleTestCase
{
- public TestCreateWebServiceMessageFromInputStream(
- MessageFactoryConfigurator mfc, SOAPSpec spec) {
- super(mfc, spec);
- }
-
@Override
protected void runTest(SoapMessageFactory messageFactory) throws Throwable
{
SoapMessage message =
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStreamMTOM.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStreamMTOM.java
index d176ea392..92ccfa4ef 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStreamMTOM.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStreamMTOM.java
@@ -21,8 +21,6 @@ package org.apache.axiom.ts.springws.soap.messagefactory;
import java.io.InputStream;
import org.apache.axiom.ts.soap.MTOMSample;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.MessageFactoryConfigurator;
import org.apache.axiom.ts.springws.SimpleTestCase;
import org.springframework.ws.soap.SoapMessage;
import org.springframework.ws.soap.SoapMessageFactory;
@@ -32,10 +30,6 @@ import org.springframework.ws.soap.SoapMessageFactory;
* SoapMessageFactory#createWebServiceMessage(InputStream)}.
*/
public class TestCreateWebServiceMessageFromInputStreamMTOM extends
SimpleTestCase {
- public
TestCreateWebServiceMessageFromInputStreamMTOM(MessageFactoryConfigurator mfc) {
- super(mfc, SOAPSpec.SOAP12);
- }
-
@Override
protected void runTest(SoapMessageFactory messageFactory) throws Throwable
{
SoapMessage message =
diff --git
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStreamVersionMismatch.java
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStreamVersionMismatch.java
index eeacf5b3f..b4759740d 100644
---
a/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStreamVersionMismatch.java
+++
b/testing/spring-ws-testsuite/src/main/java/org/apache/axiom/ts/springws/soap/messagefactory/TestCreateWebServiceMessageFromInputStreamVersionMismatch.java
@@ -23,8 +23,6 @@ import static
org.assertj.core.api.Assertions.assertThatThrownBy;
import java.io.InputStream;
import org.apache.axiom.ts.soap.SOAPSampleSet;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.springws.MessageFactoryConfigurator;
import org.apache.axiom.ts.springws.SimpleTestCase;
import org.springframework.ws.soap.SoapMessageCreationException;
import org.springframework.ws.soap.SoapMessageFactory;
@@ -35,11 +33,6 @@ import org.springframework.ws.soap.SoapMessageFactory;
* content type and the actual SOAP version used by the message.
*/
public class TestCreateWebServiceMessageFromInputStreamVersionMismatch extends
SimpleTestCase {
- public TestCreateWebServiceMessageFromInputStreamVersionMismatch(
- MessageFactoryConfigurator mfc, SOAPSpec spec) {
- super(mfc, spec);
- }
-
@Override
protected void runTest(SoapMessageFactory messageFactory) throws Throwable
{
assertThatThrownBy(
diff --git
a/testing/spring-ws-testsuite/src/test/java/org/apache/axiom/ts/springws/SpringWSTest.java
b/testing/spring-ws-testsuite/src/test/java/org/apache/axiom/ts/springws/SpringWSTest.java
index 2c47bb508..3b234bf4c 100644
---
a/testing/spring-ws-testsuite/src/test/java/org/apache/axiom/ts/springws/SpringWSTest.java
+++
b/testing/spring-ws-testsuite/src/test/java/org/apache/axiom/ts/springws/SpringWSTest.java
@@ -18,15 +18,16 @@
*/
package org.apache.axiom.ts.springws;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import java.util.stream.Stream;
-public class SpringWSTest extends TestCase {
- public static TestSuite suite() {
- SpringWSTestSuiteBuilder builder =
- new SpringWSTestSuiteBuilder(
- MessageFactoryConfigurator.SAAJ,
MessageFactoryConfigurator.SAAJ);
+import org.junit.jupiter.api.DynamicNode;
+import org.junit.jupiter.api.TestFactory;
- return builder.build();
+public class SpringWSTest {
+ @TestFactory
+ public Stream<DynamicNode> tests() {
+ return SpringWSTestSuite.create(
+ MessageFactoryConfigurator.SAAJ,
MessageFactoryConfigurator.SAAJ)
+ .toDynamicNodes();
}
}