|
|
@ -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); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |