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
Raphael
histream
Commits
670029ea
Commit
670029ea
authored
Jan 23, 2017
by
R.W.Majeed
Browse files
fixed tests for escape characters in column headers, test for units
parent
752f44fd
Changes
3
Hide whitespace changes
Inline
Side-by-side
histream-import/src/test/java/de/sekmi/histream/etl/config/TestMarshall.java
View file @
670029ea
...
...
@@ -58,7 +58,7 @@ public class TestMarshall {
Assert
.
assertNotNull
(
c
);
Assert
.
assertEquals
(
"natrium"
,
c
.
id
);
Assert
.
assertEquals
(
"na"
,
c
.
value
.
column
);
Assert
.
assertEquals
(
"mmol/
l
"
,
c
.
unit
.
constantValue
);
Assert
.
assertEquals
(
"mmol/
L
"
,
c
.
unit
.
constantValue
);
// check eav
Assert
.
assertEquals
(
1
,
ds
.
eavTables
.
length
);
...
...
histream-import/src/test/java/de/sekmi/histream/etl/config/TestReadTables.java
View file @
670029ea
...
...
@@ -64,6 +64,7 @@ public class TestReadTables {
Assert
.
assertEquals
(
"natrium"
,
o
.
getConceptId
());
Assert
.
assertEquals
(
Value
.
Type
.
Numeric
,
o
.
getValue
().
getType
());
Assert
.
assertEquals
(
BigDecimal
.
valueOf
(
124
),
o
.
getValue
().
getNumericValue
());
Assert
.
assertEquals
(
"mmol/L"
,
o
.
getValue
().
getUnits
());
ExternalSourceType
e
=
o
.
getSource
();
Assert
.
assertNotNull
(
e
);
Assert
.
assertEquals
(
"test-1"
,
e
.
getSourceId
());
...
...
histream-import/src/test/resources/data/test-1-datasource.xml
View file @
670029ea
...
...
@@ -65,15 +65,15 @@
<mdat>
<concept
id=
"natrium"
>
<value
column=
"na"
xsi:type=
"decimal"
/>
<start
column=
"zeitpunkt"
format=
"d.M.u[ H[:m[:s]]]"
/>
<unit
constant-value=
"mmol/
l
"
/>
<start
column=
"zeitpunkt"
format=
"d.M.u[ H[:m[:s]]]"
na=
""
/>
<unit
constant-value=
"mmol/
L
"
/>
<modifier
id=
"other"
>
<value
xsi:type=
"string"
na=
""
constant-value=
""
/>
</modifier>
</concept>
<concept
id=
"kalium"
>
<value
column=
"k"
xsi:type=
"decimal"
/>
<start
column=
"zeitpunkt"
format=
"d.M.u[ H[:m[:s]]]"
/>
<start
column=
"zeitpunkt"
format=
"d.M.u[ H[:m[:s]]]"
na=
""
/>
</concept>
<concept
id=
"enum1"
>
<value
column=
"en"
na=
""
xsi:type=
"string"
>
...
...
@@ -83,7 +83,17 @@
<otherwise
action=
"drop-fact"
/>
</map>
</value>
<start
column=
"zeitpunkt"
format=
"d.M.u[ H[:m[:s]]]"
/>
<start
column=
"zeitpunkt"
format=
"d.M.u[ H[:m[:s]]]"
na=
""
/>
</concept>
<concept
id=
"bun"
>
<value
column=
"bun\ /,.]+"
na=
""
xsi:type=
"string"
>
<map>
<case
value=
"1"
set-value=
""
set-concept=
"enum1_1"
/>
<case
value=
"2"
set-value=
""
set-concept=
"enum1_2"
/>
<otherwise
action=
"drop-fact"
/>
</map>
</value>
<start
column=
"zeitpunkt"
format=
"d.M.u[ H[:m[:s]]]"
na=
""
/>
</concept>
</mdat>
...
...
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