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

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

parent 752f44fd
......@@ -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);
......
......@@ -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());
......
......@@ -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>
......
Markdown is supported
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