Esempio n. 1
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new TcdSegment();
         hl7Segment.FromDelimitedString("TCA|^~&|3|4|5|6");
     });
 }
Esempio n. 2
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new TcdSegment
            {
                UniversalServiceIdentifier = new CodedWithExceptions
                {
                    Identifier = "1"
                },
                AutoDilutionFactor = new StructuredNumeric
                {
                    Comparator = "2"
                },
                RerunDilutionFactor = new StructuredNumeric
                {
                    Comparator = "3"
                },
                PreDilutionFactor = new StructuredNumeric
                {
                    Comparator = "4"
                },
                EndogenousContentOfPreDilutionDiluent = new StructuredNumeric
                {
                    Comparator = "5"
                },
                AutomaticRepeatAllowed = "6",
                ReflexAllowed          = "7",
                AnalyteRepeatStatus    = new CodedWithExceptions
                {
                    Identifier = "8"
                },
                SpecimenConsumptionQuantity = new CompositeQuantityWithUnits
                {
                    Quantity = 9
                },
                PoolSize         = 10,
                AutoDilutionType = new CodedWithExceptions
                {
                    Identifier = "11"
                }
            };

            ISegment actual = new TcdSegment();

            actual.FromDelimitedString("TCD|1|2|3|4|5|6|7|8|9|10|11");

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