@Test(timeout = 1000) public void forType_returnsCorrectPaymentMethodType() { assertEquals(PaymentMethodType.VISA, PaymentMethodType.forType("Visa")); assertEquals(PaymentMethodType.MASTERCARD, PaymentMethodType.forType("MasterCard")); assertEquals(PaymentMethodType.DISCOVER, PaymentMethodType.forType("Discover")); assertEquals(PaymentMethodType.AMEX, PaymentMethodType.forType("American Express")); assertEquals(PaymentMethodType.JCB, PaymentMethodType.forType("JCB")); assertEquals(PaymentMethodType.DINERS, PaymentMethodType.forType("Diners")); assertEquals(PaymentMethodType.MAESTRO, PaymentMethodType.forType("Maestro")); assertEquals(PaymentMethodType.PAYPAL, PaymentMethodType.forType("PayPal")); assertEquals(PaymentMethodType.ANDROID_PAY, PaymentMethodType.forType("Google Wallet")); assertEquals(PaymentMethodType.UNKNOWN, PaymentMethodType.forType("unknown")); }
@Test(timeout = 1000) public void forType_returnsUnknownForRandomString() { assertEquals(PaymentMethodType.UNKNOWN, PaymentMethodType.forType("payment method")); }