Esempio n. 1
0
        private static void FormatPhoneNumbers()
        {
            IEnumerable <string> lines = File.ReadLines(@"InputData/input.4.in");

            foreach (var(line, index) in lines.WithIndex())
            {
                FeedBackPrinter.PrintInputPhone(phoneNumber: line, phoneNumberIndexOnList: index);
                string formattedPhone = PhoneFormatter.GetFormattedPhone(line);
                FeedBackPrinter.PrintOutputPhone(formattedPhone);
            }
        }
Esempio n. 2
0
        public static void ShouldNotFormatServiceProviders(string input)
        {
            string result = PhoneFormatter.GetFormattedPhone(input);

            Assert.Equal(GetNotFoundString(input), result);
        }
Esempio n. 3
0
        public static void ShouldFormatNotGeographicPhone(string input, string output)
        {
            string result = PhoneFormatter.GetFormattedPhone(input);

            Assert.Equal(result, output);
        }
Esempio n. 4
0
        public static void ShouldFormatServiceProviders(string input, string output)
        {
            string result = PhoneFormatter.GetFormattedPhone(input);

            Assert.Equal(result, output);
        }
Esempio n. 5
0
        public static void ShouldNotFormatMobileNumbers(string input)
        {
            string result = PhoneFormatter.GetFormattedPhone(input);

            Assert.Equal(GetNotFoundString(input), result);
        }
Esempio n. 6
0
        public static void ShouldFormatMobileNumbers(string input, string output)
        {
            string result = PhoneFormatter.GetFormattedPhone(input);

            Assert.Equal(output, result);
        }
Esempio n. 7
0
        public static void ShouldNotFormatResidentialNumbers(string phoneNumber)
        {
            string result = PhoneFormatter.GetFormattedPhone(phoneNumber);

            Assert.Equal(GetNotFoundString(phoneNumber), result);
        }
Esempio n. 8
0
        public static void ShouldNotFormatNotGeographicPhone(string input)
        {
            string result = PhoneFormatter.GetFormattedPhone(input);

            Assert.Equal(GetNotFoundString(input), result);
        }