public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new ErqSegment();
         hl7Segment.FromDelimitedString("ERA|^~&|3|4|5|6");
     });
 }
        public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields()
        {
            ISegment hl7Segment = new ErqSegment
            {
                QueryTag        = "1",
                EventIdentifier = new CodedElement
                {
                    Identifier = "2"
                },
                InputParameterList = new QueryInputParameterList[]
                {
                    new QueryInputParameterList
                    {
                        SegmentFieldName = "3"
                    }
                }
            };

            string expected = "ERQ|1|2|3";
            string actual   = hl7Segment.ToDelimitedString();

            Assert.Equal(expected, actual);
        }
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new ErqSegment
            {
                QueryTag        = "1",
                EventIdentifier = new CodedElement
                {
                    Identifier = "2"
                },
                InputParameterList = new QueryInputParameterList[]
                {
                    new QueryInputParameterList
                    {
                        SegmentFieldName = "3"
                    }
                }
            };

            ISegment actual = new ErqSegment();

            actual.FromDelimitedString("ERQ|1|2|3");

            expected.Should().BeEquivalentTo(actual);
        }