Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Import Process
Mapper Service
Commits
a0f779a4
Commit
a0f779a4
authored
Jun 22, 2020
by
Jonas Waeber
Browse files
Refactor style
parent
236038de
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/kotlin/Tests.kt
View file @
a0f779a4
...
...
@@ -53,7 +53,7 @@ class Tests {
assertThat
(
config
).
isNotNull
.
hasFieldOrPropertyWithValue
(
"uriField"
,
"TestField"
)
.
hasFieldOrPropertyWithValue
(
"recordType"
,
ConstantField
(
"type"
,
"Foto"
))
}
private
val
configTestBasePath
=
"src/test/resources/configTests/"
...
...
@@ -96,7 +96,7 @@ class Tests {
replacedString
=
replacedString
.
replace
(
matchResult
.
groups
[
0
]
?.
value
.
orEmpty
(),
"_:B"
)
}
replacedString
}.
sorted
().
reduce
{
acc
,
s
->
acc
+
"\n"
+
s
}
}.
sorted
().
reduce
{
acc
,
s
->
acc
+
"\n"
+
s
}
assertThat
(
record
)
.
isNotNull
...
...
@@ -128,17 +128,32 @@ class Tests {
1
,
"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
(
2
,
"Sig Han 1293"
,
listOf
(
"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
(
Report
(
"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."
)
Report
(
"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
(
...
...
@@ -150,9 +165,21 @@ class Tests {
"https://memobase.ch/instantiation/digital/TEST-Sig_Han_1293-1"
),
listOf
(
Report
(
"https://memobase.ch/record/TEST-Sig_Han_1293"
,
"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."
)
Report
(
"https://memobase.ch/record/TEST-Sig_Han_1293"
,
"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
(
...
...
@@ -163,8 +190,16 @@ class Tests {
"https://memobase.ch/instantiation/physical/TEST-sigantur-example-0"
),
listOf
(
Report
(
"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."
)
Report
(
"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."
)
)
)
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment