Commit 5e6de51a authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Fix test

parent 58818bc8
Pipeline #16411 passed with stages
in 5 minutes and 24 seconds
......@@ -7,7 +7,6 @@ import org.junit.jupiter.api.assertThrows
import org.memobase.helpers.JSON
import java.io.File
import java.io.FileInputStream
import java.nio.charset.Charset
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestTransform {
......@@ -25,11 +24,11 @@ class TestTransform {
@Test
fun `test enriched digital metadata record`() {
val searchDoc = SearchDocTransform("https://media.memobase.k8s.unibas.ch/memo/")
val input = JSON.unpack(JSON.parse(
FileInputStream(File("$dataPath/enrich_digital_metadata_record.json")).readAllBytes().toString(
Charset.defaultCharset()
)
)[0])
val input = JSON.unpack(
JSON.parse(
FileInputStream(File("$dataPath/enrich_digital_metadata_record.json")).bufferedReader().readLines()
.reduce { acc, s -> acc + "\n" + s })[0]
)
val values = searchDoc.transform(input)
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment