|
@ -15,4 +15,15 @@ public class PaymentTest { |
|
|
assertEquals(Confirmed, reservation.getStatus()); |
|
|
assertEquals(Confirmed, reservation.getStatus()); |
|
|
assertEquals(Completed, credit_card_payment.status); |
|
|
assertEquals(Completed, credit_card_payment.status); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
public void should_be_possible_to_pay_with_bank_account(){ |
|
|
|
|
|
FlightReservation reservation = new FlightReservation(); |
|
|
|
|
|
BankTransaction payment = new BankTransaction(11, "139€", Unpaid, "Sparkasse Fulda", "DE01234567890123456789"); |
|
|
|
|
|
reservation.makePayment(payment); |
|
|
|
|
|
assertEquals(Confirmed, reservation.getStatus()); |
|
|
|
|
|
assertEquals(Completed, payment.status); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |