From 3deba442825955eeb04447bd3b511f641403bf17 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Sat, 15 Feb 2020 12:52:24 +0100 Subject: [PATCH] Rename example files --- modules/files/src/test/resources/letter-de.md | 29 ++++++++++++++++++ .../{letter-de-source.pdf => letter-de.pdf} | Bin .../{letter-de-source.txt => letter-de.txt} | 0 .../{letter-en-source.pdf => letter-en.pdf} | Bin .../{letter-en-source.txt => letter-en.txt} | 0 .../test/scala/docspell/text/TestFiles.scala | 10 +++--- .../text/ocr/TextExtractionSuite.scala | 2 +- 7 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 modules/files/src/test/resources/letter-de.md rename modules/files/src/test/resources/{letter-de-source.pdf => letter-de.pdf} (100%) rename modules/files/src/test/resources/{letter-de-source.txt => letter-de.txt} (100%) rename modules/files/src/test/resources/{letter-en-source.pdf => letter-en.pdf} (100%) rename modules/files/src/test/resources/{letter-en-source.txt => letter-en.txt} (100%) diff --git a/modules/files/src/test/resources/letter-de.md b/modules/files/src/test/resources/letter-de.md new file mode 100644 index 00000000..2941a2db --- /dev/null +++ b/modules/files/src/test/resources/letter-de.md @@ -0,0 +1,29 @@ + Max Mustermann + Lilienweg 21 + 12345 Nebendorf + E-Mail: max.muster@gmail.com + +Max Mustermann, Lilienweg 21, 12345 Nebendorf + + +EasyCare AG
+Abteilung Buchhaltung
+Ackerweg 12
+12346 Ulmen
+ + +Nebendorf, 3. September 2019 +## Sehr geehrte Damen und Herren, + +hiermit kündige ich meine Mitgliedschaft in der Kranken- und +Pflegeversicherung zum *nächstmöglichen* Termin. + +Bitte senden Sie mir innerhalb der gesetzlichen Frist von **14 Tagen** +eine Kündigungsbestätigung zu. + + +Vielen Dank im Vorraus! + +Mit freundlichen Grüßen + +Max Mustermann diff --git a/modules/files/src/test/resources/letter-de-source.pdf b/modules/files/src/test/resources/letter-de.pdf similarity index 100% rename from modules/files/src/test/resources/letter-de-source.pdf rename to modules/files/src/test/resources/letter-de.pdf diff --git a/modules/files/src/test/resources/letter-de-source.txt b/modules/files/src/test/resources/letter-de.txt similarity index 100% rename from modules/files/src/test/resources/letter-de-source.txt rename to modules/files/src/test/resources/letter-de.txt diff --git a/modules/files/src/test/resources/letter-en-source.pdf b/modules/files/src/test/resources/letter-en.pdf similarity index 100% rename from modules/files/src/test/resources/letter-en-source.pdf rename to modules/files/src/test/resources/letter-en.pdf diff --git a/modules/files/src/test/resources/letter-en-source.txt b/modules/files/src/test/resources/letter-en.txt similarity index 100% rename from modules/files/src/test/resources/letter-en-source.txt rename to modules/files/src/test/resources/letter-en.txt diff --git a/modules/text/src/test/scala/docspell/text/TestFiles.scala b/modules/text/src/test/scala/docspell/text/TestFiles.scala index ff1e6963..4db8966b 100644 --- a/modules/text/src/test/scala/docspell/text/TestFiles.scala +++ b/modules/text/src/test/scala/docspell/text/TestFiles.scala @@ -2,7 +2,7 @@ package docspell.text import fs2.Stream import cats.effect.{Blocker, IO} -import docspell.examplefiles._ +import docspell.files._ import scala.concurrent.ExecutionContext @@ -11,20 +11,20 @@ object TestFiles { implicit val CS = IO.contextShift(ExecutionContext.global) val letterSourceDE: Stream[IO, Byte] = - ExampleFiles.letter_de_source_pdf + ExampleFiles.letter_de_pdf .readURL[IO](16 * 1024, blocker) val letterSourceEN: Stream[IO, Byte] = - ExampleFiles.letter_en_source_pdf + ExampleFiles.letter_en_pdf .readURL[IO](16 * 1024, blocker) lazy val letterDEText = - ExampleFiles.letter_de_source_txt + ExampleFiles.letter_de_txt .readText[IO](16 * 1024, blocker) .unsafeRunSync lazy val letterENText = - ExampleFiles.letter_en_source_txt + ExampleFiles.letter_en_txt .readText[IO](16 * 1024, blocker) .unsafeRunSync } diff --git a/modules/text/src/test/scala/docspell/text/ocr/TextExtractionSuite.scala b/modules/text/src/test/scala/docspell/text/ocr/TextExtractionSuite.scala index ec25e9c4..01781fcc 100644 --- a/modules/text/src/test/scala/docspell/text/ocr/TextExtractionSuite.scala +++ b/modules/text/src/test/scala/docspell/text/ocr/TextExtractionSuite.scala @@ -32,7 +32,7 @@ object TextExtractionSuite extends SimpleTestSuite { } test("find mimetypes") { - docspell.examplefiles.ExampleFiles. + ExampleFiles. all.foreach { url => TikaMimetype.detect(url.readURL[IO](8192, blocker), MimeTypeHint.none). map(mt => println(url.asString + ": " + mt.asString)).