fix container customer snapshot schema migration
This commit is contained in:
+10
@@ -49,6 +49,16 @@ class PalletAllocatorTest {
|
||||
.map(PalletAllocator.AllocationDraft::plannedPackageCount).toList());
|
||||
}
|
||||
|
||||
@Test
|
||||
void keepsAtLeastTheFirstLegRecommendedPalletCount() {
|
||||
PalletAllocator.Result result = PalletAllocator.allocate(List.of(
|
||||
new PalletAllocator.LineInput(1L, "WH-A", new BigDecimal("1.5000"), 6, 3)));
|
||||
|
||||
assertEquals(3, result.pallets().size());
|
||||
assertEquals(6, result.allocations().stream()
|
||||
.mapToInt(PalletAllocator.AllocationDraft::plannedPackageCount).sum());
|
||||
}
|
||||
|
||||
private PalletAllocator.Result allocate(String volume) {
|
||||
return PalletAllocator.allocate(List.of(
|
||||
new PalletAllocator.LineInput(1L, "WH-A", new BigDecimal(volume),
|
||||
|
||||
Reference in New Issue
Block a user