public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => { ISegment hl7Segment = new LccSegment(); hl7Segment.FromDelimitedString("LCA|^~&|3|4|5|6"); }); }
public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields() { ISegment expected = new LccSegment { PrimaryKeyValueLcc = new PersonLocation { PointOfCare = new HierarchicDesignator { NamespaceId = "1" } }, LocationDepartment = new CodedWithExceptions { Identifier = "2" }, AccommodationType = new CodedWithExceptions[] { new CodedWithExceptions { Identifier = "3" } }, ChargeCode = new CodedWithExceptions[] { new CodedWithExceptions { Identifier = "4" } } }; ISegment actual = new LccSegment(); actual.FromDelimitedString("LCC|1|2|3|4"); expected.Should().BeEquivalentTo(actual); }
public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields() { ISegment hl7Segment = new LccSegment { PrimaryKeyValueLcc = new PersonLocation { PointOfCare = new HierarchicDesignator { NamespaceId = "1" } }, LocationDepartment = new CodedWithExceptions { Identifier = "2" }, AccommodationType = new CodedWithExceptions[] { new CodedWithExceptions { Identifier = "3" } }, ChargeCode = new CodedWithExceptions[] { new CodedWithExceptions { Identifier = "4" } } }; string expected = "LCC|1|2|3|4"; string actual = hl7Segment.ToDelimitedString(); Assert.Equal(expected, actual); }