public void ValidateZipCodeInput_WrongZipCode() { //Act var result = _zipCodeService.ValidateZipCodeInput("abc"); //Assert Assert.False(result); }
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(); }