use of com.braintreepayments.api.exceptions.BraintreeApiErrorResponse in project braintree_android by braintree.
the class IdealTest method startPayment_returnsError_whenOrderId_isAbsent.
@Test(timeout = 10000)
public void startPayment_returnsError_whenOrderId_isAbsent() throws InterruptedException {
IdealRequest builder = new IdealRequest().currency("EUR").amount("10").issuerId("INGBNL2A");
Ideal.startPayment(mBraintreeFragment, builder, null);
mBraintreeFragment.addListener(new BraintreeErrorListener() {
@Override
public void onError(Exception error) {
assertTrue(error instanceof BraintreeApiErrorResponse);
mCountDownLatch.countDown();
}
});
mBraintreeFragment.addListener(new BraintreePaymentResultListener() {
@Override
public void onBraintreePaymentResult(BraintreePaymentResult result) {
fail("BraintreeApiErrorResponse expected");
}
});
mCountDownLatch.await();
}
Aggregations