public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields() { ISegment hl7Segment = new VtqSegment { QueryTag = "1", QueryResponseFormatCode = "2", VtQueryName = new CodedElement { Identifier = "3" }, VirtualTableName = new CodedElement { Identifier = "4" }, SelectionCriteria = new QuerySelectionCriteria { SegmentFieldName = "5" } }; string expected = "VTQ|1|2|3|4|5"; string actual = hl7Segment.ToDelimitedString(); Assert.Equal(expected, actual); }
public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields() { ISegment expected = new VtqSegment { QueryTag = "1", QueryResponseFormatCode = "2", VtQueryName = new CodedElement { Identifier = "3" }, VirtualTableName = new CodedElement { Identifier = "4" }, SelectionCriteria = new QuerySelectionCriteria { SegmentFieldName = "5" } }; ISegment actual = new VtqSegment(); actual.FromDelimitedString("VTQ|1|2|3|4|5"); expected.Should().BeEquivalentTo(actual); }
public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => { ISegment hl7Segment = new VtqSegment(); hl7Segment.FromDelimitedString("VTA|^~&|3|4|5|6"); }); }
public PatientMatchesRequest() { MSH = new MshSegment(); VTQ = new VtqSegment(); RDF = new RdfSegment(); }