示例#1
0
        //test validity
        private static void TestValidity(string number)
        {
            Console.WriteLine("Testing {0} for validity", number);

            bool result = phoneNumberFormatter.IsValid(number);

            Console.WriteLine("IsValid: {0}", result);
        }
        public void CheckNumberValidity(string saf, string airtel, string telkom, string equitel)
        {
            bool saf_result     = _phoneNumberFormatter.IsValid(saf);
            bool airtel_result  = _phoneNumberFormatter.IsValid(airtel);
            bool telkom_result  = _phoneNumberFormatter.IsValid(telkom);
            bool equitel_result = _phoneNumberFormatter.IsValid(equitel);

            Assert.IsTrue(saf_result);
            Assert.IsTrue(airtel_result);
            Assert.IsTrue(telkom_result);
            Assert.IsTrue(equitel_result);
        }