Commit ad83a9a4 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add test for list of constants.

parent 0684ca71
......@@ -78,4 +78,12 @@ class TestMappingParser {
.isEqualTo(readFile("output5"))
}
@Test
fun `test 6 list of const for translations`() {
val mapping = MappingConfigurationParser(FileInputStream(File("$path/mapping6.yml")).readBytes())
val string = klaxon.toJsonString(mapping.get())
assertThat(string)
.isEqualTo(readFile("output6"))
}
}
record:
uri: identifier
type: type
subject:
prefLabel:
- const: "Deutsch"
- const: "Französisch"
- const: "Italienisch"
editorialNote:
- const: "Deutsch"
- const: "Französisch"
- const: "Italienisch"
\ No newline at end of file
{"digitalFieldMappers" : [], "hasProxyType" : false, "physicalFieldMappers" : [], "recordFieldMappers" : [{"agentClassType" : "subject", "fields" : [{"fields" : [{"constant" : "Deutsch", "key" : "prefLabel"}, {"constant" : "Französisch", "key" : "prefLabel"}, {"constant" : "Italienisch", "key" : "prefLabel"}], "key" : "prefLabel"}, {"fields" : [{"constant" : "Deutsch", "key" : "editorialNote"}, {"constant" : "Französisch", "key" : "editorialNote"}, {"constant" : "Italienisch", "key" : "editorialNote"}], "key" : "editorialNote"}]}], "recordType" : {"directField" : "type", "directKey" : "type", "field" : "type", "key" : "type"}, "sponsoredByMemoriav" : false, "uri" : "identifier"}
\ No newline at end of file
Supports Markdown
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