Ejemplo n.º 1
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new RgsSegment();
         hl7Segment.FromDelimitedString("RGA|^~&|3|4|5|6");
     });
 }
Ejemplo n.º 2
0
        public void ToDelimitedString_WithAllProperties_ReturnsCorrectlySequencedFields()
        {
            ISegment hl7Segment = new RgsSegment
            {
                SetIdRgs          = 1,
                SegmentActionCode = "2",
                ResourceGroupId   = new CodedWithExceptions
                {
                    Identifier = "3"
                }
            };

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

            Assert.Equal(expected, actual);
        }
Ejemplo n.º 3
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new RgsSegment
            {
                SetIdRgs          = 1,
                SegmentActionCode = "2",
                ResourceGroupId   = new CodedWithExceptions
                {
                    Identifier = "3"
                }
            };

            ISegment actual = new RgsSegment();

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

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