public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => { ISegment hl7Segment = new NdsSegment(); hl7Segment.FromDelimitedString("NDA|^~&|3|4|5|6"); }); }
public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields() { ISegment expected = new NdsSegment { NotificationReferenceNumber = 1, NotificationDateTime = new DateTime(2020, 2, 2, 0, 0, 2), NotificationAlertSeverity = new CodedWithExceptions { Identifier = "3" }, NotificationCode = new CodedWithExceptions { Identifier = "4" } }; ISegment actual = new NdsSegment(); actual.FromDelimitedString("NDS|1|20200202000002|3|4"); expected.Should().BeEquivalentTo(actual); }