Esempio n. 1
0
 public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new FacSegment();
         hl7Segment.FromDelimitedString("FAA|^~&|3|4|5|6");
     });
 }
Esempio n. 2
0
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new FacSegment
            {
                FacilityIdFac = new EntityIdentifier
                {
                    EntityId = "1"
                },
                FacilityType    = "2",
                FacilityAddress = new ExtendedAddress[]
                {
                    new ExtendedAddress
                    {
                        StreetAddress = new StreetAddress
                        {
                            StreetOrMailingAddress = "3"
                        }
                    }
                },
                FacilityTelecommunication = new ExtendedTelecommunicationNumber
                {
                    TelephoneNumber = "4"
                },
                ContactPerson = new ExtendedCompositeIdNumberAndNameForPersons[]
                {
                    new ExtendedCompositeIdNumberAndNameForPersons
                    {
                        PersonIdentifier = "5"
                    }
                },
                ContactTitle = new string[]
                {
                    "6"
                },
                ContactAddress = new ExtendedAddress[]
                {
                    new ExtendedAddress
                    {
                        StreetAddress = new StreetAddress
                        {
                            StreetOrMailingAddress = "7"
                        }
                    }
                },
                ContactTelecommunication = new ExtendedTelecommunicationNumber[]
                {
                    new ExtendedTelecommunicationNumber
                    {
                        TelephoneNumber = "8"
                    }
                },
                SignatureAuthority = new ExtendedCompositeIdNumberAndNameForPersons[]
                {
                    new ExtendedCompositeIdNumberAndNameForPersons
                    {
                        PersonIdentifier = "9"
                    }
                },
                SignatureAuthorityTitle   = "10",
                SignatureAuthorityAddress = new ExtendedAddress[]
                {
                    new ExtendedAddress
                    {
                        StreetAddress = new StreetAddress
                        {
                            StreetOrMailingAddress = "11"
                        }
                    }
                },
                SignatureAuthorityTelecommunication = new ExtendedTelecommunicationNumber
                {
                    TelephoneNumber = "12"
                }
            };

            ISegment actual = new FacSegment();

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

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