public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields() { ISegment hl7Segment = new StzSegment { SterilizationType = new CodedWithExceptions { Identifier = "1" }, SterilizationCycle = new CodedWithExceptions { Identifier = "2" }, MaintenanceCycle = new CodedWithExceptions { Identifier = "3" }, MaintenanceType = new CodedWithExceptions { Identifier = "4" } }; string expected = "STZ|1|2|3|4"; string actual = hl7Segment.ToDelimitedString(); Assert.Equal(expected, actual); }
public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields() { ISegment expected = new StzSegment { SterilizationType = new CodedWithExceptions { Identifier = "1" }, SterilizationCycle = new CodedWithExceptions { Identifier = "2" }, MaintenanceCycle = new CodedWithExceptions { Identifier = "3" }, MaintenanceType = new CodedWithExceptions { Identifier = "4" } }; ISegment actual = new StzSegment(); actual.FromDelimitedString("STZ|1|2|3|4"); expected.Should().BeEquivalentTo(actual); }
public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => { ISegment hl7Segment = new StzSegment(); hl7Segment.FromDelimitedString("STA|^~&|3|4|5|6"); }); }