test(firstleg): align customs contract assertions
This commit is contained in:
+1
-3
@@ -29,14 +29,12 @@ class WarehouseSupplierClientContractTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void openApiDocumentsServerResolvedSupplierSnapshots() throws Exception {
|
void oceanAndTruckOpenApisDocumentServerResolvedSupplierSnapshots() throws Exception {
|
||||||
String ocean = Files.readString(Path.of("src/main/resources/openapi/ocean-bookings-v1.yaml"), StandardCharsets.UTF_8);
|
String ocean = Files.readString(Path.of("src/main/resources/openapi/ocean-bookings-v1.yaml"), StandardCharsets.UTF_8);
|
||||||
String truck = Files.readString(Path.of("src/main/resources/openapi/truck-appointments-v1.yaml"), StandardCharsets.UTF_8);
|
String truck = Files.readString(Path.of("src/main/resources/openapi/truck-appointments-v1.yaml"), StandardCharsets.UTF_8);
|
||||||
String customs = Files.readString(Path.of("src/main/resources/openapi/customs-v1.yaml"), StandardCharsets.UTF_8);
|
|
||||||
assertThat(ocean).contains("bookingAgentId:", "category BOOKING",
|
assertThat(ocean).contains("bookingAgentId:", "category BOOKING",
|
||||||
"do not use domestic/international scope", "persisted snapshot always comes from Warehouse")
|
"do not use domestic/international scope", "persisted snapshot always comes from Warehouse")
|
||||||
.doesNotContain("BOOKING with INTERNATIONAL scope");
|
.doesNotContain("BOOKING with INTERNATIONAL scope");
|
||||||
assertThat(truck).contains("carrierId:", "TRUCKING", "persisted snapshot comes from Warehouse");
|
assertThat(truck).contains("carrierId:", "TRUCKING", "persisted snapshot comes from Warehouse");
|
||||||
assertThat(customs).contains("customsAgentId", "CUSTOMS", "free text cannot bypass supplier validation");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -89,9 +89,9 @@ class OutboundDispatchReadMapperContractTest {
|
|||||||
|
|
||||||
assertThat(sql)
|
assertThat(sql)
|
||||||
.contains("SELECT 'CUSTOMS'", "FROM fl_customs_container_history h JOIN fl_customs_container customs_container")
|
.contains("SELECT 'CUSTOMS'", "FROM fl_customs_container_history h JOIN fl_customs_container customs_container")
|
||||||
.contains("customs_case.tenant_id=#{tenantId}", "customs_case.order_id=#{orderId}")
|
.contains("customs_container.container_booking_id=#{containerBookingId}")
|
||||||
.contains("customs_case.inbound_id=#{inboundId}",
|
.doesNotContain("fl_customs_history", "customs_case.tenant_id=#{tenantId}",
|
||||||
"customs_case.container_booking_id=#{containerBookingId}")
|
"customs_case.order_id=#{orderId}", "customs_case.inbound_id=#{inboundId}")
|
||||||
.contains("SELECT 'SAILING_SCHEDULE'",
|
.contains("SELECT 'SAILING_SCHEDULE'",
|
||||||
"FROM fl_port_schedule_history h JOIN fl_port_schedule port_schedule")
|
"FROM fl_port_schedule_history h JOIN fl_port_schedule port_schedule")
|
||||||
.contains("port_schedule.customer_id=#{tenantId}",
|
.contains("port_schedule.customer_id=#{tenantId}",
|
||||||
|
|||||||
Reference in New Issue
Block a user