diff --git a/test/transformation/TestTransformAll.java b/test/transformation/TestTransformAll.java index 1659d5d..5f2b57c 100644 --- a/test/transformation/TestTransformAll.java +++ b/test/transformation/TestTransformAll.java @@ -46,7 +46,7 @@ public class TestTransformAll { public static void setUp() throws IOException { File output = new File(TransformAll.DATA_OUTPUT_FILE); assertThat(!output.exists() || output.delete()).as("no output file") - .isTrue(); + .isTrue(); TransformAll.process("", TransformAll.DATA_OUTPUT_FILE, "", wikidataLookupFilename); } @@ -59,29 +59,29 @@ public static void tearDown() { @Test public void multiLangAlternateName() throws IOException { - assertThat(new String( - Files.readAllBytes(Paths.get(TransformAll.DATA_OUTPUT_FILE)))) - .as("transformation output with multiLangAlternateName") - .contains("Leibniz Institute").contains("Berlin SBB"); + assertThat(new String( + Files.readAllBytes(Paths.get(TransformAll.DATA_OUTPUT_FILE)))) + .as("transformation output with multiLangAlternateName") + .contains("Leibniz Institute").contains("Berlin SBB"); } @Test public void separateUrlAndProvidesFields() throws IOException { - assertThat(new String( - Files.readAllBytes(Paths.get(TransformAll.DATA_OUTPUT_FILE)))) - .as("transformation output with `url` and `provides`") - .contains("https://www.livivo.de/?idb=ZBMED") - .contains("https://www.zbmed.de"); + assertThat(new String( + Files.readAllBytes(Paths.get(TransformAll.DATA_OUTPUT_FILE)))) + .as("transformation output with `url` and `provides`") + .contains("https://www.livivo.de/?idb=ZBMED") + .contains("https://www.zbmed.de"); } @Test public void preferSigelData() throws IOException { - assertThat(new String( - Files.readAllBytes(Paths.get(TransformAll.DATA_OUTPUT_FILE)))) - .as("transformation output with preferred Sigel data") - .contains("Hauptabteilung")// - .as("transformation output containing DBS data") - .contains("Roemer-Museum"); + assertThat(new String( + Files.readAllBytes(Paths.get(TransformAll.DATA_OUTPUT_FILE)))) + .as("transformation output with preferred Sigel data") + .contains("Hauptabteilung")// + .as("transformation output containing DBS data") + .contains("Roemer-Museum"); } @Test @@ -104,22 +104,17 @@ public void process(String obj) { fixVariables.put("wikidata2gndIdentifier", wikidataLookupFile); Metafix fixEnriched = new Metafix("conf/fix-enriched.fix", fixVariables); sourceFileOpener.setReceiver(new LineReader())// - .setReceiver(picaDecoder)// - .setReceiver(new Metafix("conf/fix-sigel.fix"))// - .setReceiver(fixEnriched)// - .setReceiver(encoder); + .setReceiver(picaDecoder)// + .setReceiver(new Metafix("conf/fix-sigel.fix"))// + .setReceiver(fixEnriched)// + .setReceiver(encoder); sourceFileOpener.process(SIGEL_DUMP_LOCATION); sourceFileOpener.closeStream(); assertThat(resultCollector.toString())// - .as("contains api description")// - .contains( - "availableChannel[]{1{type[]{1:ServiceChannel,2:WebAPI}serviceType:SRU,serviceUrl:http\\://sru.gbv.de/opac-de-hil2}"// - + "2{type[]{1:ServiceChannel,2:WebAPI}serviceType:PAIA,serviceUrl:https\\://paia.gbv.de/DE-Hil2/}"// - + "3{type[]{1:ServiceChannel,2:WebAPI}serviceType:DAIA,serviceUrl:https\\://paia.gbv.de/DE-Hil2/daia}}") - ; + .as("contains api description")// + .contains( + "availableChannel[]{1{type[]{1:ServiceChannel,2:WebAPI}serviceType:SRU,serviceUrl:http\\://sru.gbv.de/opac-de-hil2}"// + + "2{type[]{1:ServiceChannel,2:WebAPI}serviceType:PAIA,serviceUrl:https\\://paia.gbv.de/DE-Hil2/}"// + + "3{type[]{1:ServiceChannel,2:WebAPI}serviceType:DAIA,serviceUrl:https\\://paia.gbv.de/DE-Hil2/daia}}"); } - - - - } \ No newline at end of file