Skip to content
Snippets Groups Projects
Commit 0cbda1af authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-6754 KOP-2674 Verify schemaLocation is ignored

parent fdc7f58d
No related branches found
No related tags found
No related merge requests found
...@@ -113,10 +113,10 @@ class XdomeaXtaMessageCreatorFactoryTest { ...@@ -113,10 +113,10 @@ class XdomeaXtaMessageCreatorFactoryTest {
.build()); .build());
} }
@DisplayName("should set document builder feature") @DisplayName("should disallow doctype declarations")
@Test @Test
@SneakyThrows @SneakyThrows
void shouldSetDocumentBuilderFeature() { void shouldDisallowDoctypeDeclarations() {
setupMocks(); setupMocks();
factory.create(); factory.create();
......
...@@ -118,11 +118,15 @@ class XdomeaXtaMessageCreatorITCase { ...@@ -118,11 +118,15 @@ class XdomeaXtaMessageCreatorITCase {
} }
@DisplayName("should not throw with valid message 0401") @DisplayName("should not throw with valid message 0401")
@Test @ParameterizedTest
void shouldNotThrowWithValidMessage0401() { @ValueSource(strings = {
"valid-unknown-namespaces.patch",
"valid-ignored-schemaLocation.patch"
})
void shouldNotThrowWithValidMessage0401(String patchName) {
var validMessageZipFile = loadMessageFileWithPatch( var validMessageZipFile = loadMessageFileWithPatch(
"abgabe0401-kleiner-waffenschein", "abgabe0401-kleiner-waffenschein",
"valid-unknown-namespaces.patch" patchName
); );
assertThatCode(() -> creator.createMessage(validMessageZipFile)) assertThatCode(() -> creator.createMessage(validMessageZipFile))
......
diff --git a/src/test/resources/messages/abgabe0401-kleiner-waffenschein/message/84be3140-e069-4d4a-80c7-889b5eec539e_Abgabe.Abgabe.0401.zip/84be3140-e069-4d4a-80c7-889b5eec539e_Abgabe.Abgabe.0401.xml b/src/test/resources/messages/abgabe0401-kleiner-waffenschein/message/84be3140-e069-4d4a-80c7-889b5eec539e_Abgabe.Abgabe.0401.zip/84be3140-e069-4d4a-80c7-889b5eec539e_Abgabe.Abgabe.0401.xml
index c225828..9667727 100644
--- a/src/test/resources/messages/abgabe0401-kleiner-waffenschein/message/84be3140-e069-4d4a-80c7-889b5eec539e_Abgabe.Abgabe.0401.zip/84be3140-e069-4d4a-80c7-889b5eec539e_Abgabe.Abgabe.0401.xml
+++ b/src/test/resources/messages/abgabe0401-kleiner-waffenschein/message/84be3140-e069-4d4a-80c7-889b5eec539e_Abgabe.Abgabe.0401.zip/84be3140-e069-4d4a-80c7-889b5eec539e_Abgabe.Abgabe.0401.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<xdomea:Abgabe.Abgabe.0401 xmlns:xdomea="urn:xoev-de:xdomea:schema:3.0.0">
+<xdomea:Abgabe.Abgabe.0401 xmlns:xdomea="urn:xoev-de:xdomea:schema:3.0.0"
+ xmlns:xoev-code="http://xoev.de/schemata/code/1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://xoev.de/schemata/code/1_0 http://xoev.de/schemata/code/1_0/xoev-code.xsd">
<xdomea:Kopf>
<xdomea:ProzessID>84be3140-e069-4d4a-80c7-889b5eec539e</xdomea:ProzessID>
<xdomea:Nachrichtentyp listURI="urn:xoev-de:xdomea:codeliste:nachrichtentyp" listVersionID="2.0">
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment