Example #1
0
        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);
        }
Example #2
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new VtqSegment();
         hl7Segment.FromDelimitedString("VTA|^~&|3|4|5|6");
     });
 }