コード例 #1
0
        public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields()
        {
            IType hl7Type = new ParentResultLink
            {
                ParentObservationIdentifier = new CodedWithExceptions
                {
                    Identifier = "1"
                },
                ParentObservationSubIdentifier   = "2",
                ParentObservationValueDescriptor = new Text
                {
                    Value = "3"
                }
            };

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

            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            IType expected = new ParentResultLink
            {
                ParentObservationIdentifier = new CodedWithExceptions
                {
                    IsSubcomponent = true,
                    Identifier     = "1"
                },
                ParentObservationSubIdentifier   = "2",
                ParentObservationValueDescriptor = new Text
                {
                    IsSubcomponent = true,
                    Value          = "3"
                }
            };

            IType actual = new ParentResultLink();

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

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