Search in sources :

Example 21 with PaymentRequest

use of com.globalcollect.gateway.sdk.client.android.sdk.model.PaymentRequest in project connect-sdk-client-android by Ingenico-ePayments.

the class ValidationTest method testInvalidLuhn.

@Test
public void testInvalidLuhn() {
    PaymentRequest paymentRequest = new TestPaymentRequest();
    paymentRequest.setValue("luhn", invalidLuhnCheck);
    ValidationRuleLuhn rule = new ValidationRuleLuhn("", ValidationType.LUHN);
    assertEquals(false, rule.validate(paymentRequest, "luhn"));
}
Also used : PaymentRequest(com.globalcollect.gateway.sdk.client.android.sdk.model.PaymentRequest) ValidationRuleLuhn(com.globalcollect.gateway.sdk.client.android.sdk.model.validation.ValidationRuleLuhn) Test(org.junit.Test)

Aggregations

PaymentRequest (com.globalcollect.gateway.sdk.client.android.sdk.model.PaymentRequest)21 Test (org.junit.Test)19 PreparedPaymentRequest (com.globalcollect.gateway.sdk.client.android.sdk.model.PreparedPaymentRequest)4 CreatePaymentRequest (com.ingenico.connect.gateway.sdk.java.domain.payment.CreatePaymentRequest)4 CountDownLatch (java.util.concurrent.CountDownLatch)3 ValidationRuleEmailAddress (com.globalcollect.gateway.sdk.client.android.sdk.model.validation.ValidationRuleEmailAddress)2 ValidationRuleExpirationDate (com.globalcollect.gateway.sdk.client.android.sdk.model.validation.ValidationRuleExpirationDate)2 ValidationRuleFixedList (com.globalcollect.gateway.sdk.client.android.sdk.model.validation.ValidationRuleFixedList)2 ValidationRuleLength (com.globalcollect.gateway.sdk.client.android.sdk.model.validation.ValidationRuleLength)2 ValidationRuleLuhn (com.globalcollect.gateway.sdk.client.android.sdk.model.validation.ValidationRuleLuhn)2 ValidationRuleRange (com.globalcollect.gateway.sdk.client.android.sdk.model.validation.ValidationRuleRange)2 ValidationRuleRegex (com.globalcollect.gateway.sdk.client.android.sdk.model.validation.ValidationRuleRegex)2 ValidationRuleTermsAndConditions (com.globalcollect.gateway.sdk.client.android.sdk.model.validation.ValidationRuleTermsAndConditions)2 CommunicationException (com.globalcollect.gateway.sdk.client.android.sdk.exception.CommunicationException)1 PaymentProduct (com.globalcollect.gateway.sdk.client.android.sdk.model.paymentproduct.PaymentProduct)1 MaskedWallet (com.google.android.gms.wallet.MaskedWallet)1