From 4f8b1478e5a5db867b200c6afed5e68b9ba52353 Mon Sep 17 00:00:00 2001 From: Sona Markosyan Date: Tue, 8 Feb 2022 18:39:42 +0100 Subject: [PATCH] should not create itinerary when final airport is null --- .../hs/fulda/de/ci/exam/project/FrontDeskOfficerTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/java/hs/fulda/de/ci/exam/project/FrontDeskOfficerTest.java b/src/test/java/hs/fulda/de/ci/exam/project/FrontDeskOfficerTest.java index 12cd3b4..e4e48f4 100644 --- a/src/test/java/hs/fulda/de/ci/exam/project/FrontDeskOfficerTest.java +++ b/src/test/java/hs/fulda/de/ci/exam/project/FrontDeskOfficerTest.java @@ -31,4 +31,12 @@ public class FrontDeskOfficerTest { frontDeskOfficer.createItinerary(null, airport_be, new Date()); }); } + + @Test + @DisplayName("Should Not Create Itinerary when Destination Airport is null") + public void shouldThrowRuntimeExceptionWhenFinalAirportIsNull(){ + assertThrows(RuntimeException.class, () -> { + frontDeskOfficer.createItinerary(airport_fr, null, new Date()); + }); + } }