public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => { ISegment hl7Segment = new CssSegment(); hl7Segment.FromDelimitedString("CSA|^~&|3|4|5|6"); }); }
public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields() { ISegment expected = new CssSegment { StudyScheduledTimePoint = new CodedWithExceptions { Identifier = "1" }, StudyScheduledPatientTimePoint = new DateTime(2020, 2, 2, 0, 0, 2), StudyQualityControlCodes = new CodedWithExceptions[] { new CodedWithExceptions { Identifier = "3" } } }; ISegment actual = new CssSegment(); actual.FromDelimitedString("CSS|1|20200202000002|3"); expected.Should().BeEquivalentTo(actual); }