Fix failed unit test

This commit is contained in:
Manfred Karrer 2018-02-22 12:23:30 -05:00
parent 43ce9f796f
commit 3048e0f385
No known key found for this signature in database
GPG Key ID: 401250966A6B2C46

View File

@ -34,8 +34,18 @@ public class ReceiptPredicatesTest {
@Test
public void testIsSepaRelated() {
assertTrue(predicates.isSepaRelated(mock(Offer.class), mock(SepaInstantAccount.class)));
assertTrue(predicates.isSepaRelated(mock(Offer.class), mock(SepaAccount.class)));
Offer offer = mock(Offer.class);
PaymentMethod.SEPA = mock(PaymentMethod.class);
when(offer.getPaymentMethod()).thenReturn(PaymentMethod.SEPA);
assertTrue(predicates.isSepaRelated(offer, mock(SepaInstantAccount.class)));
assertTrue(predicates.isSepaRelated(offer, mock(SepaAccount.class)));
PaymentMethod.SEPA_INSTANT = mock(PaymentMethod.class);
when(offer.getPaymentMethod()).thenReturn(PaymentMethod.SEPA_INSTANT);
assertTrue(predicates.isSepaRelated(offer, mock(SepaInstantAccount.class)));
assertTrue(predicates.isSepaRelated(offer, mock(SepaAccount.class)));
}
@Test