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 8b08017c4 Eliminate SimpleSOAPSample
8b08017c4 is described below
commit 8b08017c419c5f554f3ce6accd77645c73c9787c
Author: Andreas Veithen-Knowles <[email protected]>
AuthorDate: Mon Oct 20 16:39:52 2025 +0000
Eliminate SimpleSOAPSample
---
.../apache/axiom/ts/soap/SOAPTestSuiteBuilder.java | 21 +++++++------
.../java/org/apache/axiom/ts/soap/SOAPSample.java | 17 ++++++++---
.../org/apache/axiom/ts/soap/SOAPSampleSet.java | 2 +-
.../org/apache/axiom/ts/soap/SimpleSOAPSample.java | 34 ----------------------
4 files changed, 24 insertions(+), 50 deletions(-)
diff --git
a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
index 25b48214a..d83f804cc 100644
---
a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
+++
b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
@@ -61,19 +61,18 @@ public class SOAPTestSuiteBuilder extends
MatrixTestSuiteBuilder {
goodSOAPFiles = new ArrayList<SOAPSample>();
goodSOAPFiles.addAll(
Arrays.asList(
- new SimpleSOAPSample(SOAPSpec.SOAP11,
"soap/soap11/whitespacedMessage.xml"),
- new SimpleSOAPSample(SOAPSpec.SOAP11,
"soap/soap11/minimalMessage.xml"),
- new SimpleSOAPSample(
- SOAPSpec.SOAP11,
"soap/soap11/reallyReallyBigMessage.xml"),
- new SimpleSOAPSample(SOAPSpec.SOAP11,
"soap/soap11/emtyBodymessage.xml"),
- new SimpleSOAPSample(SOAPSpec.SOAP11,
"soap/soap11/soapfault.xml"),
- new SimpleSOAPSample(SOAPSpec.SOAP11,
"soap/soap11/bodyNotQualified.xml"),
- new SimpleSOAPSample(
+ new SOAPSample(SOAPSpec.SOAP11,
"soap/soap11/whitespacedMessage.xml"),
+ new SOAPSample(SOAPSpec.SOAP11,
"soap/soap11/minimalMessage.xml"),
+ new SOAPSample(SOAPSpec.SOAP11,
"soap/soap11/reallyReallyBigMessage.xml"),
+ new SOAPSample(SOAPSpec.SOAP11,
"soap/soap11/emtyBodymessage.xml"),
+ new SOAPSample(SOAPSpec.SOAP11,
"soap/soap11/soapfault.xml"),
+ new SOAPSample(SOAPSpec.SOAP11,
"soap/soap11/bodyNotQualified.xml"),
+ new SOAPSample(
SOAPSpec.SOAP11,
"soap/soap11/faultelements-with-comment.xml"),
- new SimpleSOAPSample(
+ new SOAPSample(
SOAPSpec.SOAP11,
"soap/soap11/additional-element-after-body.xml"),
- new SimpleSOAPSample(SOAPSpec.SOAP11,
"soap/soap11/empty-header.xml"),
- new SimpleSOAPSample(SOAPSpec.SOAP12,
"soap/soap12/empty-header.xml")));
+ new SOAPSample(SOAPSpec.SOAP11,
"soap/soap11/empty-header.xml"),
+ new SOAPSample(SOAPSpec.SOAP12,
"soap/soap12/empty-header.xml")));
goodSOAPFiles.addAll(Multiton.getInstances(SOAPSample.class));
}
diff --git
a/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSample.java
b/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSample.java
index a0b891cbe..e1ebc34d5 100644
---
a/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSample.java
+++
b/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSample.java
@@ -40,13 +40,11 @@ import org.xml.sax.InputSource;
public class SOAPSample extends XMLSample {
/** A SOAP fault response that uses some SOAP 1.2 specific features. */
public static final SOAPSample SOAP12_FAULT =
- new SimpleSOAPSample(
- SOAPSpec.SOAP12, "test-message/soap12/fault.xml",
"soap12/fault.xml");
+ new SOAPSample(SOAPSpec.SOAP12, "test-message/soap12/fault.xml",
"soap12/fault.xml");
/** A SOAP 1.2 message that uses the relay attribute. */
public static final SOAPSample SOAP12_RELAY =
- new SimpleSOAPSample(
- SOAPSpec.SOAP12, "test-message/soap12/relay.xml",
"soap12/relay.xml");
+ new SOAPSample(SOAPSpec.SOAP12, "test-message/soap12/relay.xml",
"soap12/relay.xml");
private final SOAPSpec spec;
@@ -55,6 +53,17 @@ public class SOAPSample extends XMLSample {
this.spec = spec;
}
+ SOAPSample(SOAPSpec spec, String resourceName, String name) {
+ this(
+ spec,
+
MessageContent.fromClasspath(SOAPSample.class.getClassLoader(), resourceName),
+ name);
+ }
+
+ SOAPSample(SOAPSpec spec, String resourceName) {
+ this(spec, resourceName, resourceName);
+ }
+
@Instances
private static SOAPSample[] instances() {
List<SOAPSample> instances = new ArrayList<>();
diff --git
a/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleSet.java
b/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleSet.java
index e05f2a989..8e0d787f3 100644
---
a/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleSet.java
+++
b/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleSet.java
@@ -65,7 +65,7 @@ public final class SOAPSampleSet extends Multiton {
private SOAPSampleSet(String name) {
soap12Message =
- new SimpleSOAPSample(
+ new SOAPSample(
SOAPSpec.SOAP12, "test-message/set/" + name + ".xml",
"soap12/" + name);
soap11Message =
new SOAPSample(
diff --git
a/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SimpleSOAPSample.java
b/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SimpleSOAPSample.java
deleted file mode 100644
index ca704ec25..000000000
---
a/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SimpleSOAPSample.java
+++ /dev/null
@@ -1,34 +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.soap;
-
-import org.apache.axiom.ts.xml.MessageContent;
-
-final class SimpleSOAPSample extends SOAPSample {
- SimpleSOAPSample(SOAPSpec spec, String resourceName) {
- this(spec, resourceName, resourceName);
- }
-
- SimpleSOAPSample(SOAPSpec spec, String resourceName, String name) {
- super(
- spec,
-
MessageContent.fromClasspath(SimpleSOAPSample.class.getClassLoader(),
resourceName),
- name);
- }
-}