public void GetCityForCode_JSONHandler_NonexistenceZipCode() { //Act var result = _zipCodeService.GetCityForCode_JSONHandler(NonexistenceZipCode); //Assert Assert.Same(result, ListOfCities.Undefined.ToString()); }
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(); }