示例#1
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new MfaSegment
            {
                RecordLevelEventCode      = "1",
                MfnControlId              = "2",
                EventCompletionDateTime   = new DateTime(2020, 3, 3, 0, 0, 3),
                MfnRecordLevelErrorReturn = new CodedWithExceptions
                {
                    Identifier = "4"
                },
                PrimaryKeyValueMfa = new string[]
                {
                    "5"
                },
                PrimaryKeyValueTypeMfa = new string[]
                {
                    "6"
                }
            };

            ISegment actual = new MfaSegment();

            actual.FromDelimitedString("MFA|1|2|20200303000003|4|5|6");

            expected.Should().BeEquivalentTo(actual);
        }
示例#2
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new MfaSegment();
         hl7Segment.FromDelimitedString("MAA|^~&|3|4|5|6");
     });
 }