Ejemplo n.º 1
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new RxrSegment();
         hl7Segment.FromDelimitedString("RXA|^~&|3|4|5|6");
     });
 }
Ejemplo n.º 2
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new RxrSegment
            {
                Route = new CodedWithExceptions
                {
                    Identifier = "1"
                },
                AdministrationSite = new CodedWithExceptions
                {
                    Identifier = "2"
                },
                AdministrationDevice = new CodedWithExceptions
                {
                    Identifier = "3"
                },
                AdministrationMethod = new CodedWithExceptions
                {
                    Identifier = "4"
                },
                RoutingInstruction = new CodedWithExceptions
                {
                    Identifier = "5"
                },
                AdministrationSiteModifier = new CodedWithExceptions
                {
                    Identifier = "6"
                }
            };

            ISegment actual = new RxrSegment();

            actual.FromDelimitedString("RXR|1|2|3|4|5|6");

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