public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new DpsSegment
            {
                DiagnosisCodeMcp = new CodedWithExceptions
                {
                    Identifier = "1"
                },
                ProcedureCode = new CodedWithExceptions[]
                {
                    new CodedWithExceptions
                    {
                        Identifier = "2"
                    }
                },
                EffectiveDateTime  = new DateTime(2020, 3, 3, 0, 0, 3),
                ExpirationDateTime = new DateTime(2020, 4, 4, 0, 0, 4),
                TypeOfLimitation   = new CodedWithNoExceptions
                {
                    Identifier = "5"
                }
            };

            ISegment actual = new DpsSegment();

            actual.FromDelimitedString("DPS|1|2|20200303000003|20200404000004|5");

            expected.Should().BeEquivalentTo(actual);
        }
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new DpsSegment();
         hl7Segment.FromDelimitedString("DPA|^~&|3|4|5|6");
     });
 }