Commit 670029ea authored by R.W.Majeed's avatar R.W.Majeed
Browse files

fixed tests for escape characters in column headers, test for units

parent 752f44fd
...@@ -58,7 +58,7 @@ public class TestMarshall { ...@@ -58,7 +58,7 @@ public class TestMarshall {
Assert.assertNotNull(c); Assert.assertNotNull(c);
Assert.assertEquals("natrium", c.id); Assert.assertEquals("natrium", c.id);
Assert.assertEquals("na", c.value.column); Assert.assertEquals("na", c.value.column);
Assert.assertEquals("mmol/l", c.unit.constantValue); Assert.assertEquals("mmol/L", c.unit.constantValue);
// check eav // check eav
Assert.assertEquals(1, ds.eavTables.length); Assert.assertEquals(1, ds.eavTables.length);
......
...@@ -64,6 +64,7 @@ public class TestReadTables { ...@@ -64,6 +64,7 @@ public class TestReadTables {
Assert.assertEquals("natrium", o.getConceptId()); Assert.assertEquals("natrium", o.getConceptId());
Assert.assertEquals(Value.Type.Numeric, o.getValue().getType()); Assert.assertEquals(Value.Type.Numeric, o.getValue().getType());
Assert.assertEquals(BigDecimal.valueOf(124), o.getValue().getNumericValue()); Assert.assertEquals(BigDecimal.valueOf(124), o.getValue().getNumericValue());
Assert.assertEquals("mmol/L", o.getValue().getUnits());
ExternalSourceType e = o.getSource(); ExternalSourceType e = o.getSource();
Assert.assertNotNull(e); Assert.assertNotNull(e);
Assert.assertEquals("test-1", e.getSourceId()); Assert.assertEquals("test-1", e.getSourceId());
......
...@@ -65,15 +65,15 @@ ...@@ -65,15 +65,15 @@
<mdat> <mdat>
<concept id="natrium"> <concept id="natrium">
<value column="na" xsi:type="decimal"/> <value column="na" xsi:type="decimal"/>
<start column="zeitpunkt" format="d.M.u[ H[:m[:s]]]"/> <start column="zeitpunkt" format="d.M.u[ H[:m[:s]]]" na="" />
<unit constant-value="mmol/l" /> <unit constant-value="mmol/L" />
<modifier id="other"> <modifier id="other">
<value xsi:type="string" na="" constant-value=""/> <value xsi:type="string" na="" constant-value=""/>
</modifier> </modifier>
</concept> </concept>
<concept id="kalium"> <concept id="kalium">
<value column="k" xsi:type="decimal"/> <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>
<concept id="enum1"> <concept id="enum1">
<value column="en" na="" xsi:type="string"> <value column="en" na="" xsi:type="string">
...@@ -83,7 +83,17 @@ ...@@ -83,7 +83,17 @@
<otherwise action="drop-fact" /> <otherwise action="drop-fact" />
</map> </map>
</value> </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> </concept>
</mdat> </mdat>
......
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