コード例 #1
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new RdfSegment();
         hl7Segment.FromDelimitedString("RDA|^~&|3|4|5|6");
     });
 }
コード例 #2
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new RdfSegment
            {
                NumberOfColumnsPerRow = 1,
                ColumnDescription     = new RowColumnDefinition[]
                {
                    new RowColumnDefinition
                    {
                        SegmentFieldName = "2"
                    }
                }
            };

            ISegment actual = new RdfSegment();

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

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