public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields() { ISegment expected = new OdsSegment { Type = "1", ServicePeriod = new CodedWithExceptions[] { new CodedWithExceptions { Identifier = "2" } }, DietSupplementOrPreferenceCode = new CodedWithExceptions[] { new CodedWithExceptions { Identifier = "3" } }, TextInstruction = new string[] { "4" } }; ISegment actual = new OdsSegment(); actual.FromDelimitedString("ODS|1|2|3|4"); expected.Should().BeEquivalentTo(actual); }
public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => { ISegment hl7Segment = new OdsSegment(); hl7Segment.FromDelimitedString("ODA|^~&|3|4|5|6"); }); }