feat(fleet): add internal capacity pool and warehouse fulfillment bridge
This commit is contained in:
+2
@@ -15,7 +15,9 @@ import static org.assertj.core.api.Assertions.*;
|
||||
class FleetIncomingAdapterTest {
|
||||
@Test void createsRealCustomerDeliveryWithoutClaimingStockWasReceived() {
|
||||
var service=mock(WarehouseTransferService.class);var adapter=new FleetIncomingAdapter(service,mock(WarehouseTransferOrderMapper.class),new ObjectMapper());
|
||||
org.springframework.test.util.ReflectionTestUtils.setField(adapter,"fleetPool",mock(com.baiyue.lastleg.fleet.business.FleetPoolOrderBridge.class));
|
||||
var detail=mock(WarehouseTransferResponses.Detail.class);
|
||||
when(detail.lastlegOrderId()).thenReturn(71L);
|
||||
when(detail.transferNo()).thenReturn("WT-1");when(detail.inboundCode()).thenReturn("WT-1");when(detail.operatingWarehouseId()).thenReturn("92");when(detail.fbaWarehouseCode()).thenReturn("ONT8");
|
||||
when(detail.status()).thenReturn("WAIT_PDA_RECEIVING");when(detail.pallets()).thenReturn(List.of());
|
||||
when(service.createAndSubmit(eq("9"),eq("1"),any())).thenReturn(detail);when(service.review(eq("9"),eq("WT-1"),eq("1"),any())).thenReturn(detail);
|
||||
|
||||
+2
@@ -190,6 +190,8 @@ class WarehouseTransferServiceTest {
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
service = new WarehouseTransferService();
|
||||
org.springframework.test.util.ReflectionTestUtils.setField(service, "fleetPool", org.mockito.Mockito.mock(com.baiyue.lastleg.fleet.business.FleetPoolOrderBridge.class));
|
||||
org.springframework.test.util.ReflectionTestUtils.setField(service, "fleetPoolQueries", org.mockito.Mockito.mock(com.baiyue.lastleg.fleet.business.FleetPoolOrderQueries.class));
|
||||
ReflectionTestUtils.setField(service, "receiptCoordinator", receiptCoordinator);
|
||||
lenient().when(receiptCoordinator.receive(anyString(), anyString(), anyString(), any(), any(), any()))
|
||||
.thenAnswer(call -> {
|
||||
|
||||
Reference in New Issue
Block a user