From 2f7f16d83677ba4773058eca1c3c2beeb5f57bf7 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sat, 9 Dec 2023 16:44:47 +0100 Subject: [PATCH] Adapt the tests to having the CRISValidator(URL) protected (#12) --- .../metadataTests/CRISValidator.java | 27 +++++++++++++++++++ .../metadataTests/MetadataFormatTest.java | 1 - 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/CRISValidator.java diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/CRISValidator.java b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/CRISValidator.java new file mode 100644 index 0000000..99b1a6b --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/CRISValidator.java @@ -0,0 +1,27 @@ +package org.eurocris.openaire.cris.validator.metadataTests; + +import java.io.IOException; +import java.net.URL; + +import javax.xml.parsers.ParserConfigurationException; + +import org.xml.sax.SAXException; + +/** + * Adapting {@link org.eurocris.openaire.cris.validator.CRISValidator} for usage in this package. + * Just inheriting the protected constructor is needed. + */ +public class CRISValidator extends org.eurocris.openaire.cris.validator.CRISValidator { + + /** + * A simple call to {@link org.eurocris.openaire.cris.validator.CRISValidator#CRISValidator( URL )}. + * @param endpointBaseUrl + * @throws SAXException + * @throws IOException + * @throws ParserConfigurationException + */ + protected CRISValidator(URL endpointBaseUrl) throws SAXException, IOException, ParserConfigurationException { + super( endpointBaseUrl ); + } + +} diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java index 1253d5b..c49f714 100644 --- a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java @@ -5,7 +5,6 @@ import java.net.URL; -import org.eurocris.openaire.cris.validator.CRISValidator; import org.junit.Test; /**