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 b012e2171 Refactor example to separate test suite author from consumer
b012e2171 is described below
commit b012e2171fcce142315a3fba26965d5a05c72ea1
Author: Andreas Veithen-Knowles <[email protected]>
AuthorDate: Sat Feb 28 10:03:16 2026 +0000
Refactor example to separate test suite author from consumer
Split the single SAAJRITests example into two classes:
- SAAJTestSuite (author): factory method defining suite structure,
dimensions, test classes and Guice bindings
- SAAJRITests (consumer): supplies the concrete SAAJMetaFactory and
implementation-specific exclusion filters
---
docs/design/test-suite-pattern.md | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/docs/design/test-suite-pattern.md
b/docs/design/test-suite-pattern.md
index 47bb85f9c..bf887c9a9 100644
--- a/docs/design/test-suite-pattern.md
+++ b/docs/design/test-suite-pattern.md
@@ -484,13 +484,14 @@ MatrixTestContainer(SOAPSpec.class, [SOAPSpec.SOAP11,
SOAPSpec.SOAP12])
→ TestGetOwnerDocument (filtered against {spec=soap12})
```
-Consumers build a `MatrixTestSuite` and return its dynamic nodes:
+The **test suite author** (in `saaj-testsuite`) defines the suite structure —
which
+test classes to include, which dimensions to iterate over, and what Guice
bindings
+are needed — accepting only the implementation-specific factory as a parameter:
```java
-class SAAJRITests {
- @TestFactory
- Stream<DynamicNode> saajTests() {
- SAAJImplementation impl = new SAAJImplementation(new
SAAJMetaFactoryImpl());
+public class SAAJTestSuite {
+ public static MatrixTestSuite create(SAAJMetaFactory metaFactory) {
+ SAAJImplementation impl = new SAAJImplementation(metaFactory);
MatrixTestSuite suite = new MatrixTestSuite(new AbstractModule() {
@Override
protected void configure() {
@@ -508,6 +509,19 @@ class SAAJRITests {
specs.addChild(new MatrixTest(TestGetOwnerDocument.class));
suite.addChild(specs);
+ return suite;
+ }
+}
+```
+
+The **consumer** (in the implementation module) supplies the concrete factory
and
+any implementation-specific exclusion filters:
+
+```java
+class SAAJRITests {
+ @TestFactory
+ Stream<DynamicNode> saajTests() {
+ MatrixTestSuite suite = SAAJTestSuite.create(new
SAAJMetaFactoryImpl());
List<Filter> excludes = new ArrayList<>();
excludes.add(Filter.forClass(TestGetOwnerDocument.class,
"(spec=soap12)"));
return suite.toDynamicNodes(excludes);