コード例 #1
0
        public void Test_NonValidMedicareNumber()
        {
            string MedicareNumber        = "614dsf4393";
            IMedicareNumberParser Parser = new MedicareNumberParser();
            IMedicareNumber       MedNum;

            Assert.IsFalse(Parser.TryParse(MedicareNumber, out MedNum));
        }
コード例 #2
0
        public void Test_MedicareNumberGenerationWithIRNStaticMethod()
        {
            MedicareMedicareNumberGenerator MedicareMedicareNumberGenerator = new MedicareMedicareNumberGenerator();

            for (int i = 0; i < 100000; i++)
            {
                string MedicareNumberNoIrn   = MedicareMedicareNumberGenerator.Generate(true);
                IMedicareNumberParser Parser = new MedicareNumberParser();
                IMedicareNumber       MedNum;
                Assert.IsTrue(Parser.TryParse(MedicareNumberNoIrn, out MedNum));
            }
        }
コード例 #3
0
        public void Test_ValidMedicareNumberNoIrn()
        {
            string MedicareNumber        = "6140523093";
            IMedicareNumberParser Parser = new MedicareNumberParser();
            IMedicareNumber       MedNum;

            Assert.IsTrue(Parser.TryParse(MedicareNumber, out MedNum));
            Assert.AreEqual(MedicareNumber, MedNum.Value);
            Assert.AreEqual(string.Empty, MedNum.IRN);
            Assert.AreEqual("9", MedNum.Checksum);
            Assert.AreEqual("3", MedNum.IssueNumber);
        }
コード例 #4
0
        public void Test_ValidMedicareNumberZeroIssueNumber()
        {
            string MedicareNumber = "2273766560";
            string Irn            = "3";

            IMedicareNumberParser Parser = new MedicareNumberParser();
            IMedicareNumber       MedNum;

            Assert.IsFalse(Parser.TryParse(MedicareNumber + Irn, out MedNum));
            //Assert.AreEqual(MedicareNumber, MedNum.Value);
            //Assert.AreEqual(Irn, MedNum.IRN);
            //Assert.AreEqual("6", MedNum.Checksum);
            //Assert.AreEqual("0", MedNum.IssueNumber);
        }