コード例 #1
0
        public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields()
        {
            IType hl7Type = new DayTypeAndNumber
            {
                DayType = new CodedWithExceptions
                {
                    Identifier = "1"
                },
                NumberOfDays = 2
            };

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

            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            IType expected = new DayTypeAndNumber
            {
                DayType = new CodedWithExceptions
                {
                    IsSubcomponent = true,
                    Identifier     = "1"
                },
                NumberOfDays = 2
            };

            IType actual = new DayTypeAndNumber();

            actual.FromDelimitedString("1^2");

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