77
88import com .amadeus .exceptions .ResponseException ;
99import com .amadeus .referenceData .urls .CheckinLinks ;
10+ import com .amadeus .shopping .FlightDates ;
11+ import com .amadeus .shopping .FlightDestinations ;
12+ import com .amadeus .shopping .FlightOffers ;
1013import com .amadeus .travel .analytics .FareSearches ;
1114import com .amadeus .travel .analytics .airTraffic .Traveled ;
1215import org .junit .Test ;
@@ -17,6 +20,9 @@ public class NamespaceTest {
1720 assertNotNull (client .referenceData .urls .checkinLinks );
1821 assertNotNull (client .travel .analytics .airTraffic .traveled );
1922 assertNotNull (client .travel .analytics .fareSearches );
23+ assertNotNull (client .shopping .flightDates );
24+ assertNotNull (client .shopping .flightDestinations );
25+ assertNotNull (client .shopping .flightOffers );
2026 }
2127
2228 @ Test public void testGetMethods () throws ResponseException {
@@ -46,5 +52,29 @@ public class NamespaceTest {
4652 FareSearches fareSearches = new FareSearches (client );
4753 assertTrue (fareSearches .get () instanceof Response );
4854 assertTrue (fareSearches .get (params ) instanceof Response );
55+
56+ when (client .get ("/v1/shopping/flight-dates" , null ))
57+ .thenReturn (mock (Response .class ));
58+ when (client .get ("/v1/shopping/flight-dates" , params ))
59+ .thenReturn (mock (Response .class ));
60+ FlightDates flightDates = new FlightDates (client );
61+ assertTrue (flightDates .get () instanceof Response );
62+ assertTrue (flightDates .get (params ) instanceof Response );
63+
64+ when (client .get ("/v1/shopping/flight-destinations" , null ))
65+ .thenReturn (mock (Response .class ));
66+ when (client .get ("/v1/shopping/flight-destinations" , params ))
67+ .thenReturn (mock (Response .class ));
68+ FlightDestinations flightDestinations = new FlightDestinations (client );
69+ assertTrue (flightDestinations .get () instanceof Response );
70+ assertTrue (flightDestinations .get (params ) instanceof Response );
71+
72+ when (client .get ("/v1/shopping/flight-offers" , null ))
73+ .thenReturn (mock (Response .class ));
74+ when (client .get ("/v1/shopping/flight-offers" , params ))
75+ .thenReturn (mock (Response .class ));
76+ FlightOffers flightOffers = new FlightOffers (client );
77+ assertTrue (flightOffers .get () instanceof Response );
78+ assertTrue (flightOffers .get (params ) instanceof Response );
4979 }
5080}
0 commit comments