Exemple #1
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new NpuSegment();
         hl7Segment.FromDelimitedString("NPA|^~&|3|4|5|6");
     });
 }
Exemple #2
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new NpuSegment
            {
                BedLocation = new PersonLocation
                {
                    PointOfCare = new HierarchicDesignator
                    {
                        NamespaceId = "1"
                    }
                },
                BedStatus = new CodedWithExceptions
                {
                    Identifier = "2"
                }
            };

            ISegment actual = new NpuSegment();

            actual.FromDelimitedString("NPU|1|2");

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