From cdd3a81442fb06342d04cf37a66f0c0a03eaa53a Mon Sep 17 00:00:00 2001 From: Anna Tsolakou Date: Thu, 26 Jan 2023 14:30:51 +0100 Subject: [PATCH 1/4] remove hotelv2 --- README.md | 29 +- src/main/java/com/amadeus/Shopping.java | 31 -- .../com/amadeus/resources/HotelOffer.java | 338 ------------------ .../java/com/amadeus/shopping/HotelOffer.java | 64 ---- .../com/amadeus/shopping/HotelOffers.java | 61 ---- .../amadeus/shopping/HotelOffersByHotel.java | 60 ---- src/test/java/com/amadeus/NamespaceTest.java | 44 --- 7 files changed, 10 insertions(+), 617 deletions(-) delete mode 100644 src/main/java/com/amadeus/resources/HotelOffer.java delete mode 100644 src/main/java/com/amadeus/shopping/HotelOffer.java delete mode 100644 src/main/java/com/amadeus/shopping/HotelOffers.java delete mode 100644 src/main/java/com/amadeus/shopping/HotelOffersByHotel.java diff --git a/README.md b/README.md index 01fa242f..ed6078eb 100644 --- a/README.md +++ b/README.md @@ -94,10 +94,10 @@ This library conveniently maps every API path to a similar path. For example, `G amadeus.referenceData.urls.checkinLinks.get(Params.with("airlineCode", "BA")); ``` -Similarly, to select a resource by ID, you can pass in the ID to the **singular** path. For example, `GET /v2/shopping/hotel-offers/XXX` would be: +Similarly, to select a resource by ID, you can pass in the ID to the **singular** path. For example, `GET v1/reference-data/locations/pois` would be: ```java -amadeus.shopping.hotelOffer("XXX").get(...); +amadeus.referenceData.locations.pointOfInterest("9CB40CB5D0").get(); ``` You can make any arbitrary API call as well directly with the `.get` method. @@ -268,22 +268,6 @@ Period[] busiestPeriods = amadeus.travel.analytics.airTraffic.busiestPeriod.get( .and("period", "2017") .and("direction", BusiestPeriod.ARRIVING)); -// Hotel Search API -// Get list of hotels by city code -HotelOffer[] offers = amadeus.shopping.hotelOffers.get(Params - .with("cityCode", "MAD")); -// Get list of offers for a specific hotel -HotelOffer hotelOffer = amadeus.shopping.hotelOffersByHotel.get(Params.with("hotelId", "BGLONBGB")); -// Confirm the availability of a specific offer -HotelOffer offer = amadeus.shopping.hotelOffer("4BA070CE929E135B3268A9F2D0C51E9D4A6CF318BA10485322FA2C7E78C7852E").get(); - -// Hotel Booking -// The body can be a String version of your JSON or a JsonObject -HotelBooking[] hotel = amadeus.booking.hotelBookings.post(body); - -// Hotel Ratings / Sentiments -HotelSentiment[] hotelSentiments = amadeus.ereputation.hotelSentiments.get(Params.with("hotelIds", "ELONMFS,ADNYCCTB")); - // Points of Interest // What are the popular places in Barcelona (based a geo location and a radius) PointOfInterest[] pointsOfInterest = amadeus.referenceData.locations.pointsOfInterest.get(Params @@ -447,13 +431,20 @@ Hotel[] result = amadeus.referenceData.locations.hotel.get(Params HotelOfferSearch[] offers = amadeus.shopping.hotelOffersSearch.get(Params .with("hotelIds", "MCLONGHM") .and("adults", 1) - .and("checkInDate", "2022-11-22") + .and("checkInDate", "2023-05-22") .and("roomQuantity", 1) .and("paymentPolicy", "NONE") .and("bestRateOnly", true)); // Get hotel offer pricing by offer id HotelOfferSearch offer = amadeus.shopping.hotelOfferSearch("QF3MNOBDQ8").get(); +// Hotel Booking +// The body can be a String version of your JSON or a JsonObject +HotelBooking[] hotel = amadeus.booking.hotelBookings.post(body); + +// Hotel Ratings / Sentiments +HotelSentiment[] hotelSentiments = amadeus.ereputation.hotelSentiments.get(Params.with("hotelIds", "ELONMFS,ADNYCCTB")); + // Airline Routes // Get airline destinations Destination[] destinations = amadeus.airline.destinations.get(Params diff --git a/src/main/java/com/amadeus/Shopping.java b/src/main/java/com/amadeus/Shopping.java index b1de4cec..7fb026fe 100644 --- a/src/main/java/com/amadeus/Shopping.java +++ b/src/main/java/com/amadeus/Shopping.java @@ -7,10 +7,7 @@ import com.amadeus.shopping.FlightDestinations; import com.amadeus.shopping.FlightOffers; import com.amadeus.shopping.FlightOffersSearch; -import com.amadeus.shopping.HotelOffer; import com.amadeus.shopping.HotelOfferSearch; -import com.amadeus.shopping.HotelOffers; -import com.amadeus.shopping.HotelOffersByHotel; import com.amadeus.shopping.HotelOffersSearch; import com.amadeus.shopping.SeatMaps; @@ -66,14 +63,6 @@ public class Shopping { */ public FlightOffersSearch flightOffersSearch; - /** - *

- * A namespaced client for the - * /v2/shopping/hotel-offers endpoints. - *

- */ - public HotelOffers hotelOffers; - /** *

* A namespaced client for the @@ -82,14 +71,6 @@ public class Shopping { */ public HotelOffersSearch hotelOffersSearch; - /** - *

- * A namespaced client for the - * /v2/shopping/hotel-offers/by-hotel endpoints. - *

- */ - public HotelOffersByHotel hotelOffersByHotel; - /** *

* A namespaced client for the @@ -131,25 +112,13 @@ public Shopping(Amadeus client) { this.flightDates = new FlightDates(client); this.flightDestinations = new FlightDestinations(client); this.flightOffers = new FlightOffers(client); - this.hotelOffers = new HotelOffers(client); this.hotelOffersSearch = new HotelOffersSearch(client); - this.hotelOffersByHotel = new HotelOffersByHotel(client); this.flightOffersSearch = new FlightOffersSearch(client); this.seatMaps = new SeatMaps(client); this.activities = new Activities(client); this.availability = new Availability(client); } - /** - *

- * A namespaced client for the - * /v1/shopping/hotel/:hotel_id endpoints. - *

- */ - public HotelOffer hotelOffer(String hotelId) { - return new HotelOffer(client, hotelId); - } - /** *

* A namespaced client for the diff --git a/src/main/java/com/amadeus/resources/HotelOffer.java b/src/main/java/com/amadeus/resources/HotelOffer.java deleted file mode 100644 index 7fe1965d..00000000 --- a/src/main/java/com/amadeus/resources/HotelOffer.java +++ /dev/null @@ -1,338 +0,0 @@ -package com.amadeus.resources; - -import lombok.Getter; -import lombok.ToString; - -/** - * An HotelOffer object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ -@ToString -public class HotelOffer extends Resource { - private @Getter String type; - private @Getter Hotel hotel; - private @Getter boolean available; - private @Getter Offer[] offers; - - protected HotelOffer() {} - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class Hotel { - private @Getter String type; - private @Getter String hotelId; - private @Getter String chainCode; - private @Getter String brandCode; - private @Getter String dupeId; - private @Getter String name; - private @Getter Integer rating; - private @Getter TextWithLanguageType description; - private @Getter String[] amenities; - private @Getter MediaURI[] media; - private @Getter String cityCode; - private @Getter double latitude; - private @Getter double longitude; - private @Getter HotelDistance hotelDistance; - private @Getter AddressType address; - private @Getter HotelContact contact; - - protected Hotel() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class Offer extends Resource { - private @Getter String type; - private @Getter String id; - private @Getter Integer roomQuantity; - private @Getter String rateCode; - private @Getter RateFamily rateFamilyEstimated; - private @Getter String category; - private @Getter TextWithLanguageType description; - private @Getter Commission commission; - private @Getter String boardType; - private @Getter RoomDetails room; - private @Getter Guests guests; - private @Getter HotelPrice price; - private @Getter PolicyDetails policies; - - protected Offer() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class HotelDistance { - private @Getter String description; - private @Getter double distance; - private @Getter String distanceUnit; - - protected HotelDistance() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class RateFamily { - private @Getter String code; - private @Getter String type; - - protected RateFamily() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class Commission { - private @Getter String percentage; - private @Getter String amount; - private @Getter TextWithLanguageType description; - - protected Commission() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class RoomDetails { - private @Getter String type; - private @Getter EstimatedRoomType typeEstimated; - private @Getter TextWithLanguageType description; - - protected RoomDetails() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class EstimatedRoomType { - private @Getter String category; - private @Getter Integer beds; - private @Getter String bedType; - - protected EstimatedRoomType() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class HotelPrice { - private @Getter String currency; - private @Getter String total; - private @Getter String base; - private @Getter HotelTax[] taxes; - private @Getter PriceVariations variations; - - protected HotelPrice() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class HotelTax { - private @Getter String currency; - private @Getter String amount; - private @Getter String code; - private @Getter String percentage; - private @Getter boolean included; - private @Getter String description; - private @Getter String pricingFrequency; - private @Getter String pricingMode; - - protected HotelTax() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class PriceVariations { - private @Getter BaseTotalAmount average; - private @Getter PriceVariation[] changes; - - protected PriceVariations() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class PriceVariation { - private @Getter String startDate; - private @Getter String endDate; - private @Getter String base; - private @Getter String total; - - protected PriceVariation() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class BaseTotalAmount { - private @Getter String base; - private @Getter String total; - - protected BaseTotalAmount() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class Guests { - private @Getter Integer adults; - private @Getter Integer[] childAges; - - protected Guests() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class TextWithLanguageType { - private @Getter String lang; - private @Getter String text; - - protected TextWithLanguageType() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class MediaURI { - private @Getter String uri; - private @Getter String category; - - protected MediaURI() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class AddressType { - private @Getter String[] lines; - private @Getter String postalCode; - private @Getter String cityName; - private @Getter String countryCode; - private @Getter String stateCode; - - protected AddressType() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class HotelContact { - private @Getter String phone; - private @Getter String fax; - private @Getter String email; - - protected HotelContact() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class PolicyDetails { - private @Getter GuaranteePolicy guarantee; - private @Getter GuaranteePolicy deposit; - private @Getter GuaranteePolicy prepay; - private @Getter GuaranteePolicy holdTime; - private @Getter CancellationPolicy cancellation; - private @Getter CheckInOutPolicy checkInOut; - - protected PolicyDetails() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class CheckInOutPolicy { - private @Getter String checkIn; - private @Getter TextWithLanguageType checkInDescription; - private @Getter String checkOut; - private @Getter TextWithLanguageType checkOutDescription; - - protected CheckInOutPolicy() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class GuaranteePolicy { - private @Getter String amount; - private @Getter String deadline; - private @Getter TextWithLanguageType description; - private @Getter PaymentPolicy acceptedPayments; - - protected GuaranteePolicy() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class CancellationPolicy { - private @Getter String type; - private @Getter String amount; - private @Getter Integer numberOfNights; - private @Getter String percentage; - private @Getter String deadline; - private @Getter TextWithLanguageType description; - - protected CancellationPolicy() {} - } - - /** - * An HotelOffer-related object as returned by the HotelOffers API. - * @see com.amadeus.shopping.HotelOffers#get() - */ - @ToString - public class PaymentPolicy { - private @Getter String[] creditCards; - private @Getter String method; - - protected PaymentPolicy() {} - } -} diff --git a/src/main/java/com/amadeus/shopping/HotelOffer.java b/src/main/java/com/amadeus/shopping/HotelOffer.java deleted file mode 100644 index bd39b7ab..00000000 --- a/src/main/java/com/amadeus/shopping/HotelOffer.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.amadeus.shopping; - -import com.amadeus.Amadeus; -import com.amadeus.Params; -import com.amadeus.Response; -import com.amadeus.exceptions.ResponseException; -import com.amadeus.resources.Resource; - -/** - *

- * A namespaced client for the - * /v2/shopping/hotel-offers/:offer_id endpoints. - *

- * - *

- * Access via the Amadeus client object - *

- * - *
- * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
- * amadeus.shopping.HotelOffer(offerId);
- * - * @hide - */ -public class HotelOffer { - private Amadeus client; - private String offerId; - - /** - * Constructor. - * @hide - */ - public HotelOffer(Amadeus client, String offerId) { - this.offerId = offerId; - this.client = client; - } - - /** - *

- * Returns details for a specific offer. - *

- * - *
-   * amadeus.shopping.HotelOffer("XXX").get();
- * - * @param params the parameters to send to the API - * @return an API response object - * @throws ResponseException when an exception occurs - */ - public com.amadeus.resources.HotelOffer get(Params params) throws ResponseException { - String path = String.format("/v2/shopping/hotel-offers/%s", offerId); - Response response = client.get(path, params); - return (com.amadeus.resources.HotelOffer) Resource.fromObject( - response, com.amadeus.resources.HotelOffer.class); - } - - /** - * Convenience method for calling get without any parameters. - * @see com.amadeus.resources.HotelOffer#get() - */ - public com.amadeus.resources.HotelOffer get() throws ResponseException { - return get(null); - } -} diff --git a/src/main/java/com/amadeus/shopping/HotelOffers.java b/src/main/java/com/amadeus/shopping/HotelOffers.java deleted file mode 100644 index ea9737a1..00000000 --- a/src/main/java/com/amadeus/shopping/HotelOffers.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.amadeus.shopping; - -import com.amadeus.Amadeus; -import com.amadeus.Params; -import com.amadeus.Response; -import com.amadeus.exceptions.ResponseException; -import com.amadeus.resources.HotelOffer; -import com.amadeus.resources.Resource; -import com.google.gson.Gson; - -/** - *

- * A namespaced client for the - * /v1/shopping/hotel-offers endpoints. - *

- * - *

- * Access via the Amadeus client object. - *

- * - *
- * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
- * amadeus.shopping.hotelOffers;
- */ -public class HotelOffers { - private Amadeus client; - - /** - * Constructor. - * @hide - */ - public HotelOffers(Amadeus client) { - this.client = client; - } - - /** - *

- * Search for hotels and retrieve availability and rates information. - *

- * - *
-   * amadeus.shopping.hotelOffers.get(Params
-   *   .with("cityCode", "PAR"));
- * - * @param params the parameters to send to the API - * @return an API response object - * @throws ResponseException when an exception occurs - */ - public HotelOffer[] get(Params params) throws ResponseException { - Response response = client.get("/v2/shopping/hotel-offers", params); - return (HotelOffer[]) Resource.fromArray(response, HotelOffer[].class); - } - - /** - * Convenience method for calling get without any parameters. - * @see HotelOffers#get() - */ - public HotelOffer[] get() throws ResponseException { - return get(null); - } -} diff --git a/src/main/java/com/amadeus/shopping/HotelOffersByHotel.java b/src/main/java/com/amadeus/shopping/HotelOffersByHotel.java deleted file mode 100644 index f22f6610..00000000 --- a/src/main/java/com/amadeus/shopping/HotelOffersByHotel.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.amadeus.shopping; - -import com.amadeus.Amadeus; -import com.amadeus.Params; -import com.amadeus.Response; -import com.amadeus.exceptions.ResponseException; -import com.amadeus.resources.HotelOffer; -import com.amadeus.resources.Resource; - -/** - *

- * A namespaced client for the - * /v2/shopping/hotel-offers/by-hotel endpoints. - *

- * - *

- * Access via the Amadeus client object. - *

- * - *
- * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
- * amadeus.shopping.HotelOffersByHotel;
- */ -public class HotelOffersByHotel { - private Amadeus client; - - /** - * Constructor. - * @hide - */ - public HotelOffersByHotel(Amadeus client) { - this.client = client; - } - - /** - *

- * Get all offers for a dedicated hotel. - *

- * - *
-   * amadeus.shopping.HotelOffersByHotel.get(Params
-   *   .with("hotelId", "XKPARC12"));
- * - * @param params the parameters to send to the API - * @return an API response object - * @throws ResponseException when an exception occurs - */ - public HotelOffer get(Params params) throws ResponseException { - Response response = client.get("/v2/shopping/hotel-offers/by-hotel", params); - return (HotelOffer) Resource.fromObject(response, HotelOffer.class); - } - - /** - * Convenience method for calling get without any parameters. - * @see HotelOffersByHotel#get() - */ - public HotelOffer get() throws ResponseException { - return get(null); - } -} diff --git a/src/test/java/com/amadeus/NamespaceTest.java b/src/test/java/com/amadeus/NamespaceTest.java index a176ec88..05831dc5 100644 --- a/src/test/java/com/amadeus/NamespaceTest.java +++ b/src/test/java/com/amadeus/NamespaceTest.java @@ -33,9 +33,6 @@ import com.amadeus.shopping.FlightDates; import com.amadeus.shopping.FlightDestinations; import com.amadeus.shopping.FlightOffersSearch; -import com.amadeus.shopping.HotelOffer; -import com.amadeus.shopping.HotelOffers; -import com.amadeus.shopping.HotelOffersByHotel; import com.amadeus.shopping.HotelOffersSearch; import com.amadeus.shopping.SeatMaps; import com.amadeus.shopping.availability.FlightAvailabilities; @@ -90,12 +87,8 @@ public class NamespaceTest { assertNotNull(client.shopping.flightOffersSearch.pricing); assertNotNull(client.shopping.flightOffers.prediction); assertNotNull(client.shopping.flightOffers.upselling); - assertNotNull(client.shopping.hotelOffers); - assertNotNull(client.shopping.hotelOffersSearch); - assertNotNull(client.shopping.hotelOffersByHotel); assertNotNull(client.shopping.seatMaps); assertNotNull(client.ereputation.hotelSentiments); - assertNotNull(client.shopping.hotelOffer("XXX")); assertNotNull(client.airport.predictions.onTime); assertNotNull(client.booking.flightOrder("XXX")); assertNotNull(client.booking.hotelBookings); @@ -428,43 +421,6 @@ public void testFlightDestinations() throws ResponseException { assertEquals(flightDestinations.get().length, 2); } - @Test - public void testHotelOffers() throws ResponseException { - // Testing hotel offers v2 - Mockito.when(client.get("/v2/shopping/hotel-offers", null)) - .thenReturn(multiResponse); - Mockito.when(client.get("/v2/shopping/hotel-offers", params)) - .thenReturn(multiResponse); - HotelOffers hotelOffers = new HotelOffers(client); - assertNotNull(hotelOffers.get()); - assertNotNull(hotelOffers.get(params)); - assertEquals(hotelOffers.get().length, 2); - } - - @Test - public void testHotelOffersByHotel() throws ResponseException { - // Testing hotel offer search for a hotel - Mockito.when(client.get("/v2/shopping/hotel-offers/by-hotel", null)) - .thenReturn(singleResponse); - Mockito.when(client.get("/v2/shopping/hotel-offers/by-hotel", params)) - .thenReturn(singleResponse); - HotelOffersByHotel hotelOffersByHotel = new HotelOffersByHotel(client); - assertNotNull(hotelOffersByHotel.get()); - assertNotNull(hotelOffersByHotel.get(params)); - } - - @Test - public void testHotelOffersByIdl() throws ResponseException { - // Test fetching a specific offer - Mockito.when(client.get("/v2/shopping/hotel-offers/XXX", null)) - .thenReturn(singleResponse); - Mockito.when(client.get("/v2/shopping/hotel-offers/XXX", params)) - .thenReturn(singleResponse); - HotelOffer hotelOffer = new HotelOffer(client, "XXX"); - assertNotNull(hotelOffer.get()); - assertNotNull(hotelOffer.get(params)); - } - @Test public void testHotelOffersSearch() throws ResponseException { // Testing Hotel Offers Search v3 From 4352042237ac2e07f163e73951587417af86eadd Mon Sep 17 00:00:00 2001 From: Anna Tsolakou Date: Thu, 26 Jan 2023 17:10:43 +0100 Subject: [PATCH 2/4] fix test --- src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java b/src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java index 02902feb..66eabb6e 100644 --- a/src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java +++ b/src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java @@ -12,7 +12,6 @@ import com.amadeus.Params; import com.amadeus.exceptions.ClientException; import com.amadeus.exceptions.ResponseException; -import com.amadeus.resources.HotelOffer; import com.amadeus.resources.HotelOfferSearch; import com.github.tomakehurst.wiremock.WireMockServer; import java.io.IOException; From a3cc81b905a530e0dc3836378dceb8b7496960d2 Mon Sep 17 00:00:00 2001 From: Anna Tsolakou Date: Thu, 26 Jan 2023 17:12:07 +0100 Subject: [PATCH 3/4] remove unused imports --- src/test/java/com/amadeus/booking/FlightOrdersIT.java | 1 - src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java | 1 - .../amadeus/shopping/availability/FlightAvailabilitiesIT.java | 1 - src/test/java/com/amadeus/shopping/flightOffers/PricingIT.java | 1 - src/test/java/com/amadeus/shopping/flightOffers/UpsellingIT.java | 1 - 5 files changed, 5 deletions(-) diff --git a/src/test/java/com/amadeus/booking/FlightOrdersIT.java b/src/test/java/com/amadeus/booking/FlightOrdersIT.java index 11ad717f..398362d1 100644 --- a/src/test/java/com/amadeus/booking/FlightOrdersIT.java +++ b/src/test/java/com/amadeus/booking/FlightOrdersIT.java @@ -3,7 +3,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; -import static org.assertj.core.api.BDDAssertions.then; import static org.junit.jupiter.api.Assertions.assertNotNull; import com.amadeus.Amadeus; diff --git a/src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java b/src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java index 66eabb6e..6fbee2e2 100644 --- a/src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java +++ b/src/test/java/com/amadeus/shopping/HotelOffersSearchIT.java @@ -5,7 +5,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; -import static org.assertj.core.api.BDDAssertions.then; import static org.junit.jupiter.api.Assertions.assertNotEquals; import com.amadeus.Amadeus; diff --git a/src/test/java/com/amadeus/shopping/availability/FlightAvailabilitiesIT.java b/src/test/java/com/amadeus/shopping/availability/FlightAvailabilitiesIT.java index 8b675a06..3689265a 100644 --- a/src/test/java/com/amadeus/shopping/availability/FlightAvailabilitiesIT.java +++ b/src/test/java/com/amadeus/shopping/availability/FlightAvailabilitiesIT.java @@ -3,7 +3,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; -import static org.assertj.core.api.BDDAssertions.then; import static org.junit.jupiter.api.Assertions.assertNotNull; import com.amadeus.Amadeus; diff --git a/src/test/java/com/amadeus/shopping/flightOffers/PricingIT.java b/src/test/java/com/amadeus/shopping/flightOffers/PricingIT.java index 3e955854..2a789354 100644 --- a/src/test/java/com/amadeus/shopping/flightOffers/PricingIT.java +++ b/src/test/java/com/amadeus/shopping/flightOffers/PricingIT.java @@ -3,7 +3,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; -import static org.assertj.core.api.BDDAssertions.then; import static org.junit.jupiter.api.Assertions.assertNotNull; import com.amadeus.Amadeus; diff --git a/src/test/java/com/amadeus/shopping/flightOffers/UpsellingIT.java b/src/test/java/com/amadeus/shopping/flightOffers/UpsellingIT.java index bd2a4d7f..1c2f6bfb 100644 --- a/src/test/java/com/amadeus/shopping/flightOffers/UpsellingIT.java +++ b/src/test/java/com/amadeus/shopping/flightOffers/UpsellingIT.java @@ -3,7 +3,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; -import static org.assertj.core.api.BDDAssertions.then; import static org.junit.jupiter.api.Assertions.assertNotNull; import com.amadeus.Amadeus; From 34118066b5b372e9e85a5e2e82bdab41b769234c Mon Sep 17 00:00:00 2001 From: Anna Tsolakou Date: Fri, 27 Jan 2023 14:21:18 +0100 Subject: [PATCH 4/4] add missing assert --- src/test/java/com/amadeus/NamespaceTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/com/amadeus/NamespaceTest.java b/src/test/java/com/amadeus/NamespaceTest.java index 05831dc5..f1f83ea3 100644 --- a/src/test/java/com/amadeus/NamespaceTest.java +++ b/src/test/java/com/amadeus/NamespaceTest.java @@ -89,6 +89,7 @@ public class NamespaceTest { assertNotNull(client.shopping.flightOffers.upselling); assertNotNull(client.shopping.seatMaps); assertNotNull(client.ereputation.hotelSentiments); + assertNotNull(client.shopping.hotelOffersSearch); assertNotNull(client.airport.predictions.onTime); assertNotNull(client.booking.flightOrder("XXX")); assertNotNull(client.booking.hotelBookings);