test: freeze server-filtered booking candidates
This commit is contained in:
+4
-1
@@ -71,7 +71,10 @@ class PlatformOceanBookingControllerContractTest {
|
||||
.contains("warehouseId", "channelCode", "containerType")
|
||||
.contains("LinkCandidateResponse", "requiredQuantity", "allocatedQuantity", "remainingQuantity")
|
||||
.contains("Capacity and max weight are derived display snapshots and never eligibility fields")
|
||||
.contains("booking detail calls are not used");
|
||||
.contains("Returns only linkable requirement candidates")
|
||||
.contains("An empty result is a normal successful page")
|
||||
.contains("booking detail calls are not used")
|
||||
.doesNotContain("mismatchReasons", "disabledReason");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+15
@@ -210,6 +210,21 @@ class OceanBookingServiceTest {
|
||||
verify(repository, never()).containers(anyLong());
|
||||
}
|
||||
|
||||
@Test
|
||||
void linkCandidatesReturnsNormalEmptyPageWithOneSetQueryAndNoDiagnosticFields() {
|
||||
when(repository.linkCandidates(any())).thenReturn(new PageResult<>(List.of(), 1, 20, 0, 0));
|
||||
|
||||
PageResult<LinkCandidate> result = service.linkCandidates(
|
||||
new LinkCandidateQuery(701L, "SEA-US", "45HC", null, null));
|
||||
|
||||
assertThat(result.records()).isEmpty();
|
||||
assertThat(result.total()).isZero();
|
||||
assertThat(result.pages()).isZero();
|
||||
verify(repository, times(1)).linkCandidates(any());
|
||||
assertThat(LinkCandidate.class.getRecordComponents()).extracting(java.lang.reflect.RecordComponent::getName)
|
||||
.doesNotContain("mismatchReasons", "disabledReason", "warehouseId", "channelCode");
|
||||
}
|
||||
|
||||
@Test
|
||||
void releaseRejectsInvalidScheduleWithoutTransition() {
|
||||
OceanBookingEntity draft = completeBooking("DRAFT", 3);
|
||||
|
||||
Reference in New Issue
Block a user