Ejemplo n.º 1
0
        public void GetAreaCode_InvalidCode_ReturnsEmptyString()
        {
            string code = "abcd";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetAreaCode(code);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 2
0
        public void GetCountryNameFromXML_InvalidCountryID_ResturnsEmptyString()
        {
            int countryID = 0;

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCountryName(countryID);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 3
0
        public void GetCarrierName_EmptyAreaCode_ReturnsEmptyString()
        {
            string areaCode = String.Empty;

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCarrierName(areaCode);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 4
0
        public void GetCountryCode_EmptyString_ReturnsEmptyString()
        {
            string code = "";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCountryCode(code);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 5
0
        public void GetCountryIDFromXML_EmptyAreaCode_ResturnsEmptyString()
        {
            string areaCode = "";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCountryID(areaCode);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 6
0
        public void GetCarrierName_InvalidAreaCode_ReturnsEmptyString()
        {
            string areaCode = "123456";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCarrierName(areaCode);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 7
0
        public void GetAreaCode_InvalidCode_ReturnsEmptyString()
        {
            string code = "abcd";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetAreaCode(code);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 8
0
        public void GetCityName_EmptyAreaCode_ReturnsEmptyString()
        {
            string areaCode = String.Empty;

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCityName(areaCode);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 9
0
        public void GetCountryIDFromXML_AreaCodeOfDresdenGermany_Returns49()
        {
            string areaCode = "+49351";
            string expected = "49";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCountryID(areaCode);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 10
0
        public void GetPhoneFormatFromXML_GetSameAreaFormatForGermany_ReturnsGermanSameAreaFormat()
        {
            int    countryID = 49;
            string expected  = "G";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetPhoneFormat(countryID, DISTANCE_RULE.SameAreaRule);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 11
0
        public void GetPhoneFormatFromXML_GetInternationalFormatForGermany_ResturnsGermanInternationalFormat()
        {
            int    countryID = 49;
            string expected  = "00EFG";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetPhoneFormat(countryID, DISTANCE_RULE.InternationalRule);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 12
0
        public void GetAreaCode_FragmentOfGermanMobileNumberFromTMobie_ReturnsAreaCodeForTMobileGermany()
        {
            string code     = "+49151124";
            string expected = "+491511";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetAreaCode(code);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 13
0
        public void GetAreaCode_FragmentOfGermanPhoneNumberFromDresden_ResturnsAreaCodeForDresdenGermany()
        {
            string code     = "+4935126";
            string expected = "+49351";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetAreaCode(code);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 14
0
        public void GetCarrierName_AreaCodeOfTMobileGermany_ReturnsTMobileGermany()
        {
            string areaCode = "+491511";
            string expected = "T-Mobile (D1)";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCarrierName(areaCode);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 15
0
        public void GetPhoneFormatFromXML_GetCanonicalFormat_ReturnsCanonicalFormat()
        {
            int    countryID = 49;
            string expected  = PhoneNumberConstants.CANONICAL_FORMAT;

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetPhoneFormat(countryID, DISTANCE_RULE.CANONICAL);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 16
0
        public void GetCityName_AreaCodeOfDresdenGermany_ReturnsDresden()
        {
            string areaCode = "+49351";
            string expected = "Dresden";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCityName(areaCode);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 17
0
        public void GetCountryNameFromXML_GermanCountryID_ReturnsGermany()
        {
            int    countryID = 49;
            string expected  = "Germany";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCountryName(countryID);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 18
0
        public void GetCarrierName_AreaCodeOfTMobileGermany_ReturnsTMobileGermany()
        {
            string areaCode = "+491511";
            string expected = "T-Mobile (D1)";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCarrierName(areaCode);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 19
0
        public void GetCountryCode_FragmentOfGermanNumber_Returns49()
        {
            string code     = "49351";
            string expected = "49";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string             actual          = xmlDataProvider.GetCountryCode(code);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 20
0
        public void GetAreaCode_FragmentOfGermanPhoneNumberFromDresden_ResturnsAreaCodeForDresdenGermany()
        {
            string code = "+4935126";
            string expected = "+49351";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetAreaCode(code);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 21
0
        public void GetAreaCode_FragmentOfGermanMobileNumberFromTMobie_ReturnsAreaCodeForTMobileGermany()
        {
            string code = "+49151124";
            string expected = "+491511";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetAreaCode(code);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 22
0
        public void GetCountryCode_EmptyString_ReturnsEmptyString()
        {
            string code = "";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCountryCode(code);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 23
0
        public void GetPhoneFormatFromXML_GetSameAreaFormatForGermany_ReturnsGermanSameAreaFormat()
        {
            int countryID = 49;
            string expected = "G";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetPhoneFormat(countryID, DISTANCE_RULE.SameAreaRule);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 24
0
        public void GetPhoneFormatFromXML_GetCanonicalFormat_ReturnsCanonicalFormat()
        {
            int countryID = 49;
            string expected = PhoneNumberConstants.CANONICAL_FORMAT;

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetPhoneFormat(countryID, DISTANCE_RULE.CANONICAL);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 25
0
        public void GetPhoneFormatFromXML_GetInternationalFormatForGermany_ResturnsGermanInternationalFormat()
        {
            int countryID = 49;
            string expected = "00EFG";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetPhoneFormat(countryID, DISTANCE_RULE.InternationalRule);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 26
0
        public void GetCountryNameFromXML_InvalidCountryID_ResturnsEmptyString()
        {
            int countryID = 0;

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCountryName(countryID);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 27
0
        public void GetCountryNameFromXML_GermanCountryID_ReturnsGermany()
        {
            int countryID = 49;
            string expected = "Germany";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCountryName(countryID);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 28
0
        public void GetCountryIDFromXML_EmptyAreaCode_ResturnsEmptyString()
        {
            string areaCode = "";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCountryID(areaCode);

            Assert.IsEmpty(actual);
        }
Ejemplo n.º 29
0
        public void GetCountryIDFromXML_AreaCodeOfDresdenGermany_Returns49()
        {
            string areaCode = "+49351";
            string expected = "49";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCountryID(areaCode);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 30
0
        public void GetCountryCode_FragmentOfGermanNumber_Returns49()
        {
            string code = "49351";
            string expected = "49";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCountryCode(code);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 31
0
        public void GetCityName_AreaCodeOfDresdenGermany_ReturnsDresden()
        {
            string areaCode = "+49351";
            string expected = "Dresden";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCityName(areaCode);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 32
0
        public void GetCityName_InvalidAreaCode_ReturnsEmptyString()
        {
            string areaCode = "123456";

            PhoneNumberDataXml xmlDataProvider = new PhoneNumberDataXml();
            string actual = xmlDataProvider.GetCityName(areaCode);

            Assert.IsEmpty(actual);
        }