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 0f3126e22 Implement a better way to deal with null values in
SOAPTestSuite
0f3126e22 is described below
commit 0f3126e225ddf63d5e9aa2b5fd466e74a5a6cd66
Author: Andreas Veithen-Knowles <[email protected]>
AuthorDate: Mon Mar 23 22:58:52 2026 +0000
Implement a better way to deal with null values in SOAPTestSuite
---
.../org/apache/axiom/ts/soap/SOAPTestSuite.java | 23 +++++++---------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git
a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuite.java
b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuite.java
index 6d0929462..a3cc31765 100644
---
a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuite.java
+++
b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuite.java
@@ -43,6 +43,7 @@ import
org.apache.axiom.ts.dimension.serialization.SerializationStrategy;
import com.google.common.collect.ImmutableList;
import com.google.inject.Key;
import com.google.inject.name.Names;
+import com.google.inject.util.Providers;
public class SOAPTestSuite {
private static final ImmutableList<String> badSOAPFiles =
@@ -450,12 +451,15 @@ public class SOAPTestSuite {
headerBlockAttributeTests(),
new
MatrixTest(org.apache.axiom.ts.soap.headerblock.TestBlobOMDataSource.class),
new FanOutNode<>(
- ImmutableList.<Boolean>of(Boolean.TRUE, Boolean.FALSE),
- Binding.singleton(Key.get(Boolean.class,
Names.named("processed"))),
+ // This is non-standard because of the null value.
+ injector -> Arrays.asList(Boolean.TRUE, Boolean.FALSE,
null),
+ (binder, value) ->
+ binder.bind(Boolean.class)
+
.annotatedWith(Names.named("processed"))
+ .toProvider(Providers.of(value)),
(injector, value, params) ->
params.addTestParameter("processed",
String.valueOf(value)),
new
MatrixTest(org.apache.axiom.ts.soap.headerblock.TestClone.class)),
- nullProcessedCloneTest(),
new MatrixTest(
org.apache.axiom.ts.soap.headerblock
.TestCloneProcessedWithoutPreservingModel.class),
@@ -743,19 +747,6 @@ public class SOAPTestSuite {
.class)))))));
}
- /**
- * Special handling for the null-processed case of headerblock.TestClone,
which can't go through
- * a FanOutNode<Boolean> since there's no way to bind null.
- */
- private static MatrixTestNode nullProcessedCloneTest() {
- return new InjectorNode(
- binder ->
- binder.bind(Boolean.class)
- .annotatedWith(Names.named("processed"))
-
.toProvider(com.google.inject.util.Providers.of(null)),
- new
MatrixTest(org.apache.axiom.ts.soap.headerblock.TestClone.class));
- }
-
private static MatrixTestNode soap11Tests() {
return new ParentNode(
new
MatrixTest(org.apache.axiom.ts.soap11.builder.TestBuilder.class),