From 90078e129a021e2958804a7dbd33fab76f594185 Mon Sep 17 00:00:00 2001 From: Sona Markosyan Date: Thu, 10 Feb 2022 00:51:48 +0100 Subject: [PATCH] search flight as an admin --- src/test/java/hs/fulda/de/ci/exam/project/AdminTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/java/hs/fulda/de/ci/exam/project/AdminTest.java b/src/test/java/hs/fulda/de/ci/exam/project/AdminTest.java index 4d9653b..bee72b8 100644 --- a/src/test/java/hs/fulda/de/ci/exam/project/AdminTest.java +++ b/src/test/java/hs/fulda/de/ci/exam/project/AdminTest.java @@ -103,6 +103,11 @@ public class AdminTest { }); } - + @Test + public void test_searchFlight(){ + when(flightRepository.findFlightByFlightNumber(any(String.class))).thenReturn(flight1.toString()); + assertNotNull(admin.searchFlights("1")); + assertEquals(admin.searchFlights("1"), flight1.toString()); + } }