public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields() { ISegment expected = new McpSegment { SetIdMcp = 1, ProducersServiceTestObservationId = new CodedWithExceptions { Identifier = "2" }, UniversalServicePriceRangeLowValue = new Money { Quantity = 3 }, UniversalServicePriceRangeHighValue = new Money { Quantity = 4 }, ReasonForUniversalServiceCostRange = "5" }; ISegment actual = new McpSegment(); actual.FromDelimitedString("MCP|1|2|3|4|5"); expected.Should().BeEquivalentTo(actual); }
public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => { ISegment hl7Segment = new McpSegment(); hl7Segment.FromDelimitedString("MCA|^~&|3|4|5|6"); }); }