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
libraries
Mapper Service Configuration
Commits
0548bac9
Commit
0548bac9
authored
Mar 11, 2021
by
Jonas Waeber
Browse files
Add error message.
parent
0ce345d5
Pipeline
#23082
passed with stage
in 2 minutes and 14 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/main/kotlin/builder/ResourceBuilder.kt
View file @
0548bac9
...
...
@@ -50,11 +50,11 @@ class ResourceBuilder(
when
(
val
id
=
source
[
config
.
uri
])
{
is
String
->
recordId
=
id
is
Int
->
recordId
=
id
.
toString
()
is
JsonArray
<
*
>
->
"Found multiple values in the field '${config.uri}' for identifiers: ${
is
JsonArray
<
*
>
->
errorMessages
.
add
(
"Found multiple values in the field '${config.uri}' for identifiers: ${
id
.
joinToString
(
", "
)
}.
"
}.
"
)
null
->
errorMessages
.
add
(
"The value for id is 'null' in field '${config.uri}'."
)
else
->
errorMessages
.
add
(
"Invalid value '$id' for id in field '${config.uri}'."
)
}
...
...
src/test/kotlin/ch/memobase/test/LocalTestRun.kt
View file @
0548bac9
...
...
@@ -34,9 +34,9 @@ import org.junit.jupiter.api.TestInstance
class
LocalTestRun
{
private
val
log
=
LogManager
.
getLogger
(
this
::
class
.
java
)
private
val
headerMetadata
=
HeaderMetadata
(
"
sw
i-00
1
"
,
"
at
i-00
2
"
,
"1"
,
"
sw
i"
,
"
at
i"
,
false
,
"record"
,
"identifierMain"
,
...
...
@@ -46,9 +46,9 @@ class LocalTestRun {
@Test
@Disabled
fun
`test
local
folder`
()
{
val
folder
=
"/home/jonas/memobase/data/
sw
i-00
1
"
val
inputFolder
=
"/home/jonas/memobase/data/test-
sw
i/step-2"
val
outputFolder
=
"/home/jonas/memobase/data/test-
sw
i/step-3"
val
folder
=
"/home/jonas/memobase/data/
at
i-00
2
"
val
inputFolder
=
"/home/jonas/memobase/data/test-
at
i/step-2"
val
outputFolder
=
"/home/jonas/memobase/data/test-
at
i/step-3"
val
mappingFile
=
"/config/mapping.yml"
val
klaxon
=
Klaxon
()
val
configurationParser
=
MappingConfigurationParser
(
File
(
folder
+
mappingFile
).
readBytes
())
...
...
Write
Preview
Markdown
is supported
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