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

Refactor style

parent 236038de
...@@ -53,7 +53,7 @@ class Tests { ...@@ -53,7 +53,7 @@ class Tests {
assertThat(config).isNotNull assertThat(config).isNotNull
.hasFieldOrPropertyWithValue("uriField", "TestField") .hasFieldOrPropertyWithValue("uriField", "TestField")
.hasFieldOrPropertyWithValue("recordType", ConstantField("type", "Foto")) .hasFieldOrPropertyWithValue("recordType", ConstantField("type", "Foto"))
} }
private val configTestBasePath = "src/test/resources/configTests/" private val configTestBasePath = "src/test/resources/configTests/"
...@@ -96,7 +96,7 @@ class Tests { ...@@ -96,7 +96,7 @@ class Tests {
replacedString = replacedString.replace(matchResult.groups[0]?.value.orEmpty(), "_:B") replacedString = replacedString.replace(matchResult.groups[0]?.value.orEmpty(), "_:B")
} }
replacedString replacedString
}.sorted().reduce { acc, s -> acc + "\n" + s } }.sorted().reduce { acc, s -> acc + "\n" + s }
assertThat(record) assertThat(record)
.isNotNull .isNotNull
...@@ -128,17 +128,32 @@ class Tests { ...@@ -128,17 +128,32 @@ class Tests {
1, 1,
"MEI_49884", "MEI_49884",
listOf("MEI_49884"), listOf("MEI_49884"),
listOf(Report("MEI_49884", "FAILURE", "No type for record in field 'Foto for source {original_id=MEI_49884}.")) listOf(
Report(
"MEI_49884",
"FAILURE",
"No type for record in field 'Foto for source {original_id=MEI_49884}."
)
)
), ),
KafkaTestParams( KafkaTestParams(
2, 2,
"Sig Han 1293", "Sig Han 1293",
listOf( listOf(
"https://memobase.ch/record/TEST-Sig_Han_1293", "https://memobase.ch/record/TEST-Sig_Han_1293",
"https://memobase.ch/instantiation/digital/TEST-Sig_Han_1293-0"), "https://memobase.ch/instantiation/digital/TEST-Sig_Han_1293-0"
),
listOf( listOf(
Report("https://memobase.ch/record/TEST-Sig_Han_1293", "SUCCESS", "Successfully created a record from source."), Report(
Report("https://memobase.ch/instantiation/digital/TEST-Sig_Han_1293-0", "SUCCESS", "Successfully created a digital instantiation from source.") "https://memobase.ch/record/TEST-Sig_Han_1293",
"SUCCESS",
"Successfully created a record from source."
),
Report(
"https://memobase.ch/instantiation/digital/TEST-Sig_Han_1293-0",
"SUCCESS",
"Successfully created a digital instantiation from source."
)
) )
), ),
KafkaTestParams( KafkaTestParams(
...@@ -150,9 +165,21 @@ class Tests { ...@@ -150,9 +165,21 @@ class Tests {
"https://memobase.ch/instantiation/digital/TEST-Sig_Han_1293-1" "https://memobase.ch/instantiation/digital/TEST-Sig_Han_1293-1"
), ),
listOf( listOf(
Report("https://memobase.ch/record/TEST-Sig_Han_1293", "SUCCESS", "Successfully created a record from source."), Report(
Report("https://memobase.ch/instantiation/physical/TEST-Sig_Han_1293-0", "SUCCESS", "Successfully created a physical instantiation from source."), "https://memobase.ch/record/TEST-Sig_Han_1293",
Report("https://memobase.ch/instantiation/digital/TEST-Sig_Han_1293-1", "SUCCESS", "Successfully created a digital instantiation from source.") "SUCCESS",
"Successfully created a record from source."
),
Report(
"https://memobase.ch/instantiation/physical/TEST-Sig_Han_1293-0",
"SUCCESS",
"Successfully created a physical instantiation from source."
),
Report(
"https://memobase.ch/instantiation/digital/TEST-Sig_Han_1293-1",
"SUCCESS",
"Successfully created a digital instantiation from source."
)
) )
), ),
KafkaTestParams( KafkaTestParams(
...@@ -163,8 +190,16 @@ class Tests { ...@@ -163,8 +190,16 @@ class Tests {
"https://memobase.ch/instantiation/physical/TEST-sigantur-example-0" "https://memobase.ch/instantiation/physical/TEST-sigantur-example-0"
), ),
listOf( listOf(
Report("https://memobase.ch/record/TEST-sigantur-example", "SUCCESS", "Successfully created a record from source."), Report(
Report("https://memobase.ch/instantiation/physical/TEST-sigantur-example-0", "SUCCESS", "Successfully created a physical instantiation from source.") "https://memobase.ch/record/TEST-sigantur-example",
"SUCCESS",
"Successfully created a record from source."
),
Report(
"https://memobase.ch/instantiation/physical/TEST-sigantur-example-0",
"SUCCESS",
"Successfully created a physical instantiation from source."
)
) )
) )
) )
......
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