Example #1
0
        public void Test_HPI_I_IsValid_CheckDigit_Fasle()
        {
            string Value = "8003610001218577";
            IHealthcareProviderIdentifierIndividual       HPII;
            IHealthcareProviderIdentifierIndividualParser Parser = new HealthcareProviderIdentifierIndividualParser();

            Assert.IsFalse(Parser.TryParse(Value, out HPII));
        }
Example #2
0
        public void Test_GenerateRandomHPI_I()
        {
            IHealthcareProviderIdentifierIndividualGenerator Generator = new HealthcareProviderIdentifierIndividualGenerator();
            string NewRandom = Generator.Generate();
            IHealthcareProviderIdentifierIndividual       HPII;
            IHealthcareProviderIdentifierIndividualParser Parser = new HealthcareProviderIdentifierIndividualParser();

            Assert.IsTrue(Parser.TryParse(NewRandom, out HPII));
        }
Example #3
0
        public void Test_HPI_I_IsValid_True()
        {
            string Value = "8003610001218573";
            IHealthcareProviderIdentifierIndividual       HPII;
            IHealthcareProviderIdentifierIndividualParser Parser = new HealthcareProviderIdentifierIndividualParser();

            Assert.IsTrue(Parser.TryParse(Value, out HPII));
            Assert.AreEqual("80", HPII.IndustryCode);
            Assert.AreEqual("036", HPII.CountryCode);
            Assert.AreEqual("1", HPII.NumberIssuerCode);
            Assert.AreEqual("000121857", HPII.UniqueReference);
            Assert.AreEqual("3", HPII.CheckDigit);
            Assert.AreEqual(Value, HPII.Value);
        }