Browse Source

bank transaction validation

feature-pr-feature-paymentOptions
Imron 3 years ago
parent
commit
10f5c98486
  1. 10
      src/test/java/hs/fulda/de/ci/exam/project/PaymentTest.java

10
src/test/java/hs/fulda/de/ci/exam/project/PaymentTest.java

@ -34,5 +34,15 @@ public class PaymentTest {
assertEquals(Failed, credit_card_payment.status);
}
@Test
public void paymentShould_not_be_possible_if_iban_is_wrong(){
BankTransaction bank_payment = new BankTransaction(11, "139€", Unpaid, "Sparkasse Fulda", "DE012");
FlightReservation reservation = new FlightReservation();
reservation.makePayment(bank_payment);
assertEquals(ReservationStatus.Cancelled, reservation.getStatus());
assertEquals(Failed, bank_payment.status);
}
}
Loading…
Cancel
Save