public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new DstSegment();
         hl7Segment.FromDelimitedString("DSA|^~&|3|4|5|6");
     });
 }
        public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields()
        {
            ISegment hl7Segment = new DstSegment
            {
                Destination = new CodedWithExceptions
                {
                    Identifier = "1"
                },
                Route = new CodedWithExceptions[]
                {
                    new CodedWithExceptions
                    {
                        Identifier = "2"
                    }
                }
            };

            string expected = "DST|1|2";
            string actual   = hl7Segment.ToDelimitedString();

            Assert.Equal(expected, actual);
        }
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new DstSegment
            {
                Destination = new CodedWithExceptions
                {
                    Identifier = "1"
                },
                Route = new CodedWithExceptions[]
                {
                    new CodedWithExceptions
                    {
                        Identifier = "2"
                    }
                }
            };

            ISegment actual = new DstSegment();

            actual.FromDelimitedString("DST|1|2");

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