예제 #1
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new Cm1Segment();
         hl7Segment.FromDelimitedString("CMA|^~&|3|4|5|6");
     });
 }
예제 #2
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new Cm1Segment
            {
                SetIdCm1             = 1,
                StudyPhaseIdentifier = new CodedWithExceptions
                {
                    Identifier = "2"
                },
                DescriptionOfStudyPhase = "3"
            };

            ISegment actual = new Cm1Segment();

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

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