public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields() { ISegment expected = new SprSegment { QueryTag = "1", QueryResponseFormatCode = "2", StoredProcedureName = new CodedElement { Identifier = "3" }, InputParameterList = new QueryInputParameterList[] { new QueryInputParameterList { SegmentFieldName = "4" } } }; ISegment actual = new SprSegment(); actual.FromDelimitedString("SPR|1|2|3|4"); expected.Should().BeEquivalentTo(actual); }
public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => { ISegment hl7Segment = new SprSegment(); hl7Segment.FromDelimitedString("SPA|^~&|3|4|5|6"); }); }