From 4908e75a9e783423d0035a2833a46c6633d8b59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Mon, 8 Apr 2024 16:16:35 +0200 Subject: [PATCH] lift to module path, adjust tests --- .../xml/test/XmlNamespaceContextTest.java | 9 ++++++++ .../xml/test/json/namespace.properties | 2 ++ .../content/xml/test/namespace.properties | 22 +------------------ .../settings/content/test/SettingsTest.java | 2 ++ 4 files changed, 14 insertions(+), 21 deletions(-) create mode 100644 content-xml/src/test/resources/org/xbib/content/xml/test/json/namespace.properties diff --git a/content-xml/src/test/java/org/xbib/content/xml/test/XmlNamespaceContextTest.java b/content-xml/src/test/java/org/xbib/content/xml/test/XmlNamespaceContextTest.java index 3920636..50e2569 100644 --- a/content-xml/src/test/java/org/xbib/content/xml/test/XmlNamespaceContextTest.java +++ b/content-xml/src/test/java/org/xbib/content/xml/test/XmlNamespaceContextTest.java @@ -19,6 +19,15 @@ public class XmlNamespaceContextTest { @Test public void testDefaultNamespaces() throws Exception { XmlNamespaceContext context = XmlNamespaceContext.newInstance(getClass()); + context.addNamespace("atom", "http://www.w3.org/2005/Atom"); + context.addNamespace("dc", "http://purl.org/dc/elements/1.1/"); + context.addNamespace("dcterms", "http://purl.org/dc/terms/"); + context.addNamespace("foaf", "http://xmlns.com/foaf/0.1/"); + context.addNamespace("owl", "http://www.w3.org/2002/07/owl#"); + context.addNamespace("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); + context.addNamespace("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); + context.addNamespace("xalan", "http://xml.apache.org/xslt"); + context.addNamespace("xsl", "http://www.w3.org/1999/XSL/Transform"); XmlXParams params = new XmlXParams(context); try (XContentBuilder builder = contentBuilder(params)) { builder.startObject() diff --git a/content-xml/src/test/resources/org/xbib/content/xml/test/json/namespace.properties b/content-xml/src/test/resources/org/xbib/content/xml/test/json/namespace.properties new file mode 100644 index 0000000..08bdee8 --- /dev/null +++ b/content-xml/src/test/resources/org/xbib/content/xml/test/json/namespace.properties @@ -0,0 +1,2 @@ +dc = http://purl.org/dc/elements/1.1/ +dcterms = http://purl.org/dc/terms/ diff --git a/content-xml/src/test/resources/org/xbib/content/xml/test/namespace.properties b/content-xml/src/test/resources/org/xbib/content/xml/test/namespace.properties index 1d177de..1bb8bf6 100644 --- a/content-xml/src/test/resources/org/xbib/content/xml/test/namespace.properties +++ b/content-xml/src/test/resources/org/xbib/content/xml/test/namespace.properties @@ -1,21 +1 @@ -# XML namespace -xml = http://www.w3.org/XML/1998/namespace -xsl = http://www.w3.org/1999/XSL/Transform - -# Atom -atom = http://www.w3.org/2005/Atom - -# RDF namespace -rdf = http://www.w3.org/1999/02/22-rdf-syntax-ns# -rdfs = http://www.w3.org/2000/01/rdf-schema# -owl = http://www.w3.org/2002/07/owl# - -foaf = http://xmlns.com/foaf/0.1/ - -# Apache -xalan = http://xml.apache.org/xslt - -# Dublin Core Namespaces -# http://dublincore.org/documents/dcmi-namespace/ -dc = http://purl.org/dc/elements/1.1/ -dcterms = http://purl.org/dc/terms/ +# empty diff --git a/settings-content/src/test/java/org/xbib/settings/content/test/SettingsTest.java b/settings-content/src/test/java/org/xbib/settings/content/test/SettingsTest.java index 4705d90..cf17450 100644 --- a/settings-content/src/test/java/org/xbib/settings/content/test/SettingsTest.java +++ b/settings-content/src/test/java/org/xbib/settings/content/test/SettingsTest.java @@ -1,5 +1,6 @@ package org.xbib.settings.content.test; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.xbib.content.core.XContentHelper; import org.xbib.content.io.BytesArray; @@ -199,6 +200,7 @@ public class SettingsTest { assertEquals("{code.a=b, code.b=c, name.a=b, name.b=c, list.0=a, list.1=b, null=null}", result.toString()); } + @Disabled("no refresh supported") @Test public void testRefresher() throws Exception { Settings settings = Settings.settingsBuilder()