Ejemplo n.º 1
0
        public void GetCityForCode_Offline_OneChar()
        {
            //Act
            var result = _zipCodeService.GetCityForCode_Offline("a");

            //Assert
            Assert.True(result.Equals(ListOfCities.Undefined));
        }
Ejemplo n.º 2
0
        private static void ValidateZipCode()
        {
            Console.WriteLine(AppResources.ValidateZipCode_EnterZipCode);
            string code = Console.ReadLine();

            Console.WriteLine(ZipCodeService.ValidateZipCodeInput(code)
                ? ConnectionService.HasInternetConnection() ?
                              $"{AppResources.ValidateZipCode_CodeValidation} {ValidationResult.poprawny}. {AppResources.ValidateZipCode_BelongsTo} {ZipCodeService.GetCityForCode_JSONHandler(code)}"
                    : $"{AppResources.ValidateZipCode_CodeValidation} {ValidationResult.poprawny}. {AppResources.ValidateZipCode_BelongsTo} {ZipCodeService.GetCityForCode_Offline(code)}"
                : $"{AppResources.ValidateZipCode_CodeValidation} {ValidationResult.niepoprawny}.");
            ExitApp();
        }