예제 #1
0
        public virtual void TestParseValueAttributeInvalidRealCoordTooLarge()
        {
            XmlNode node = CreateNode("<something value=\"10000\" />");
            BareANY real = new RealElementParser().Parse(CreateContext("REAL.COORD"), node, this.xmlResult);

            Assert.AreEqual(new BigDecimal("10000"), real.BareValue, "correct value returned");
            Assert.AreEqual(1, this.xmlResult.GetHl7Errors().Count, "1 error");
        }
예제 #2
0
        public virtual void TestParseValueAttributeValidRealConfMax()
        {
            XmlNode node = CreateNode("<something value=\"1.0000\" />");
            BareANY real = new RealElementParser().Parse(CreateContext("REAL.CONF"), node, this.xmlResult);

            Assert.AreEqual(new BigDecimal("1.0000"), real.BareValue, "correct value returned");
            Assert.IsTrue(this.xmlResult.IsValid(), "no errors");
        }
예제 #3
0
        public virtual void TestParseValueAttributeValidReal()
        {
            XmlNode node = CreateNode("<something value=\"0.2345\" />");
            BareANY real = new RealElementParser().Parse(CreateContext("REAL"), node, this.xmlResult);

            Assert.AreEqual(new BigDecimal("0.2345"), real.BareValue, "correct value returned");
            Assert.IsNull(real.NullFlavor, "no null flavor");
            Assert.IsTrue(this.xmlResult.IsValid(), "no errors");
        }