public void FromDelimitedString_WithIncorrectSegmentId_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         ISegment hl7Segment = new VndSegment();
         hl7Segment.FromDelimitedString("VNA|^~&|3|4|5|6");
     });
 }
        public void FromDelimitedString_WithAllProperties_ReturnsCorrectlyInitializedFields()
        {
            ISegment expected = new VndSegment
            {
                SetIdVnd         = 1,
                VendorIdentifier = new EntityIdentifier
                {
                    EntityId = "2"
                },
                VendorName          = "3",
                VendorCatalogNumber = new EntityIdentifier
                {
                    EntityId = "4"
                },
                PrimaryVendorIndicator = new CodedWithNoExceptions
                {
                    Identifier = "5"
                },
                Corporation = new EntityIdentifier[]
                {
                    new EntityIdentifier
                    {
                        EntityId = "6"
                    }
                },
                PrimaryContact = new ExtendedCompositeIdNumberAndNameForPersons
                {
                    PersonIdentifier = "7"
                },
                ContractAdjustment = new MoneyOrPercentage
                {
                    MoneyOrPercentageIndicator = "8"
                },
                AssociatedContractId = new EntityIdentifier[]
                {
                    new EntityIdentifier
                    {
                        EntityId = "9"
                    }
                },
                ClassOfTrade = new string[]
                {
                    "10"
                },
                PricingTierLevel = new CodedWithNoExceptions
                {
                    Identifier = "11"
                }
            };

            ISegment actual = new VndSegment();

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

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