@Test public void isValidCardNumber_with_a_number_with_less_than_7_digits_returns_false() { String number = "42 42 42"; boolean valid = CreditCard4J.isValidCardNumber(number); assertFalse(valid); }
public static boolean isValidCardNumber(String cardNumber) { try { validateCardNumber(cardNumber); return true; } catch (CreditCard4JException e) { return false; } }
CreditCard4J { public static boolean isValidCardNumber(String cardNumber) { try { validateCardNumber(cardNumber); return true; } catch (CreditCard4JException e) { return false; } } }
CreditCard4J { public static boolean isValidCardNumber(String cardNumber) { try { validateCardNumber(cardNumber); return true; } catch (CreditCard4JException e) { return false; } }  }
CreditCard4J { public static boolean isValidCardNumber(String cardNumber) { try { validateCardNumber(cardNumber); return true; } catch (CreditCard4JException e) { return false; } }  static void resetConfig(); static CardBrand getBrand(String cardNumber); static String validateCardNumber(String cardNumber); static boolean isValidCardNumber(String cardNumber); }
CreditCard4J { public static boolean isValidCardNumber(String cardNumber) { try { validateCardNumber(cardNumber); return true; } catch (CreditCard4JException e) { return false; } }  static void resetConfig(); static CardBrand getBrand(String cardNumber); static String validateCardNumber(String cardNumber); static boolean isValidCardNumber(String cardNumber); static String[] ALLOWED_CARD_NUMBERS_SPACING_CHARACTERS; }