|
|
@ -0,0 +1,16 @@ |
|
|
|
package hs.fulda.de.ci.exam.project; |
|
|
|
|
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
import static hs.fulda.de.ci.exam.project.ReservationStatus.Confirmed; |
|
|
|
import static org.junit.jupiter.api.Assertions.assertTrue; |
|
|
|
|
|
|
|
public class NotificationTest { |
|
|
|
@Test |
|
|
|
public void emailNotificationShouldBeSentWhenFlighReservationCompleted() { |
|
|
|
FlightReservation reservation = new FlightReservation(); |
|
|
|
reservation.setStatus(Confirmed); |
|
|
|
boolean result = reservation.notifyUser("email", "test@gmail.com","Reservation is Confirmed!"); |
|
|
|
assertTrue(result); |
|
|
|
} |
|
|
|
} |