public void TestParseQuantity() { var i = new Model.Quantity(3.14m, "kg", "http://mysystsem.org"); var node = i.ToTypedElement(); var p = node.ParseQuantity(); Assert.True(p.IsExactly(i)); }
public void TestParseBindableQuantity() { var iq = new Model.Quantity(4.0m, "kg", system: null); var node = iq.ToTypedElement(); var c = node.ParseBindable() as Coding; Assert.NotNull(c); Assert.Equal(iq.Code, c.Code); Assert.Equal("http://unitsofmeasure.org", c.System); // auto filled out by parsebinding() }