You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2026/06/16 07:16:35 UTC
(santuario-xml-security-java) branch main updated: Fixing test after XMLUnit upgrade
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/santuario-xml-security-java.git
The following commit(s) were added to refs/heads/main by this push:
new 5c448dda Fixing test after XMLUnit upgrade
5c448dda is described below
commit 5c448dda30d2cdd27db616756fb5ed19f2182c3e
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue Jun 16 08:16:21 2026 +0100
Fixing test after XMLUnit upgrade
---
.../xml/security/test/stax/XMLSecurityStreamWriterTest.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamWriterTest.java b/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamWriterTest.java
index fb420755..e35a30df 100644
--- a/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamWriterTest.java
+++ b/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamWriterTest.java
@@ -28,6 +28,7 @@ import java.util.List;
import java.util.Set;
import javax.xml.namespace.NamespaceContext;
+import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.stream.XMLEventWriter;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
@@ -46,6 +47,7 @@ import org.apache.xml.security.stax.impl.XMLSecurityStreamWriter;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.xmlunit.matchers.CompareMatcher;
+import org.xmlunit.util.DocumentBuilderFactoryConfigurer;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -189,7 +191,11 @@ class XMLSecurityStreamWriterTest {
stdXmlStreamWriter.close();
}
- assertThat(stdStringWriter.toString(), CompareMatcher.isSimilarTo(securityStringWriter.toString()));
+ assertThat(stdStringWriter.toString(),
+ CompareMatcher.isSimilarTo(securityStringWriter.toString())
+ .withDocumentBuilderFactory(
+ DocumentBuilderFactoryConfigurer.DefaultWithDTDParsing.configure(
+ DocumentBuilderFactory.newInstance())));
}
// @see https://issues.apache.org/jira/browse/SANTUARIO-433