Example #1
0
        public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields()
        {
            IType hl7Type = new StructuredNumeric
            {
                Comparator      = "1",
                Num1            = 2,
                SeparatorSuffix = "3",
                Num2            = 4
            };

            string expected = "1^2^3^4";
            string actual   = hl7Type.ToDelimitedString();

            Assert.Equal(expected, actual);
        }
Example #2
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            IType expected = new StructuredNumeric
            {
                Comparator      = "1",
                Num1            = 2,
                SeparatorSuffix = "3",
                Num2            = 4
            };

            IType actual = new StructuredNumeric();

            actual.FromDelimitedString("1^2^3^4");

            expected.Should().BeEquivalentTo(actual);
        }