Skip to content

Commit 1416bcb

Browse files
committed
add unit test for transfer management
1 parent 11207a8 commit 1416bcb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/test/java/com/amadeus/NamespaceTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.amadeus.exceptions.ResponseException;
1616
import com.amadeus.location.analytics.CategoryRatedAreas;
1717
import com.amadeus.ordering.TransferOrders;
18+
import com.amadeus.ordering.transferOrders.transfers.Cancellation;
1819
import com.amadeus.referencedata.Airlines;
1920
import com.amadeus.referencedata.Location;
2021
import com.amadeus.referencedata.Locations;
@@ -27,6 +28,7 @@
2728
import com.amadeus.referencedata.locations.hotels.ByGeocode;
2829
import com.amadeus.referencedata.locations.hotels.ByHotels;
2930
import com.amadeus.referencedata.urls.CheckinLinks;
31+
import com.amadeus.resources.TransferCancellation;
3032
import com.amadeus.safety.SafetyRatedLocations;
3133
import com.amadeus.schedule.Flights;
3234
import com.amadeus.shopping.Activities;
@@ -113,6 +115,7 @@ public class NamespaceTest {
113115
assertNotNull(client.referenceData.locations.cities);
114116
assertNotNull(client.airline.destinations);
115117
assertNotNull(client.ordering.tranferOrders);
118+
assertNotNull(client.ordering.transferOrder("XXX"));
116119
}
117120

118121
/**
@@ -815,4 +818,14 @@ public void testTransferOrders() throws ResponseException {
815818
assertNotNull(transferOrders.post(body, params));
816819
}
817820

821+
@Test
822+
public void testTransferCancellation() throws ResponseException {
823+
// Testing Transfer Management
824+
Params params = Params.with("foo", "bar");
825+
Mockito.when(client.post("/v1/ordering/transfer-orders/XXX/transfers/cancellation", params, body))
826+
.thenReturn(singleResponse);
827+
Cancellation transferCancellation = new Cancellation(client, "XXX");
828+
assertNotNull(transferCancellation.post(body, params));
829+
}
830+
818831
}

0 commit comments

Comments
 (0)