|
10 | 10 | import com.amadeus.referenceData.locations.Airports; |
11 | 11 | import com.amadeus.referenceData.locations.PointsOfInterest; |
12 | 12 | import com.amadeus.referenceData.urls.CheckinLinks; |
13 | | -import com.amadeus.resources.Delay; |
14 | 13 | import com.amadeus.shopping.FlightDates; |
15 | 14 | import com.amadeus.shopping.FlightDestinations; |
16 | 15 | import com.amadeus.shopping.FlightOffers; |
17 | 16 | import com.amadeus.shopping.FlightOffersSearch; |
18 | 17 | import com.amadeus.shopping.HotelOffer; |
19 | 18 | import com.amadeus.shopping.HotelOffers; |
20 | 19 | import com.amadeus.shopping.HotelOffersByHotel; |
| 20 | +import com.amadeus.shopping.SeatMaps; |
21 | 21 | import com.amadeus.shopping.flightOffers.Prediction; |
22 | 22 | import com.amadeus.travel.analytics.airTraffic.Booked; |
23 | 23 | import com.amadeus.travel.analytics.airTraffic.BusiestPeriod; |
@@ -58,6 +58,7 @@ public void testAllNamespacesExist() { |
58 | 58 | TestCase.assertNotNull(client.shopping.flightOffers.prediction); |
59 | 59 | TestCase.assertNotNull(client.shopping.hotelOffers); |
60 | 60 | TestCase.assertNotNull(client.shopping.hotelOffersByHotel); |
| 61 | + TestCase.assertNotNull(client.shopping.seatMaps); |
61 | 62 | TestCase.assertNotNull(client.ereputation.hotelSentiments); |
62 | 63 | TestCase.assertNotNull(client.shopping.hotelOffer("XXX")); |
63 | 64 | TestCase.assertNotNull(client.airport.predictions.onTime); |
@@ -280,6 +281,14 @@ public void testGetMethods() throws ResponseException { |
280 | 281 | TestCase.assertNotNull(flightDelay.get()); |
281 | 282 | TestCase.assertNotNull(flightDelay.get(params)); |
282 | 283 |
|
| 284 | + // Test SeatMaps get |
| 285 | + Mockito.when(client.get("/v1/shopping/seatmaps", null)) |
| 286 | + .thenReturn(multiResponse); |
| 287 | + Mockito.when(client.get("/v1/shopping/seatmaps", params)) |
| 288 | + .thenReturn(multiResponse); |
| 289 | + SeatMaps seatmap = new SeatMaps(client); |
| 290 | + TestCase.assertNotNull(seatmap.get(params)); |
| 291 | + |
283 | 292 | // Test fetching a specific offer |
284 | 293 | Mockito.when(client.get("/v1/booking/flight-orders/XXX", null)) |
285 | 294 | .thenReturn(singleResponse); |
@@ -313,5 +322,16 @@ public void testPostMethods() throws ResponseException { |
313 | 322 | TestCase.assertNotNull(flightOfferSearch.post()); |
314 | 323 | TestCase.assertNotNull(flightOfferSearch.post(body)); |
315 | 324 | TestCase.assertEquals(flightOfferSearch.post().length, 2); |
| 325 | + |
| 326 | + // Test SeatMaps post |
| 327 | + Mockito.when(client.post("/v1/shopping/seatmaps", (String) null)) |
| 328 | + .thenReturn(multiResponse); |
| 329 | + Mockito.when(client.post("/v1/shopping/seatmaps", body)) |
| 330 | + .thenReturn(multiResponse); |
| 331 | + Mockito.when(client.post("/v1/shopping/seatmaps", jsonObject)) |
| 332 | + .thenReturn(multiResponse); |
| 333 | + SeatMaps seatmap = new SeatMaps(client); |
| 334 | + TestCase.assertNotNull(seatmap.post()); |
| 335 | + TestCase.assertNotNull(seatmap.post(body)); |
316 | 336 | } |
317 | 337 | } |
0 commit comments