fix(firstleg): instantiate PDA progress projection

This commit is contained in:
2026-08-10 14:31:03 +08:00
parent a81f73d835
commit 013de5e921
3 changed files with 39 additions and 7 deletions
@@ -10,6 +10,25 @@ import java.lang.reflect.Method;
import static org.assertj.core.api.Assertions.assertThat;
class LoadingPickItemMapperContractTest {
@Test
void inboundProgressProjectionCanBeInstantiatedByMyBatis() throws Exception {
LoadingPickItemMapper.InboundProgress progress = LoadingPickItemMapper.InboundProgress.class
.getDeclaredConstructor().newInstance();
progress.setExpectedCount(5);
progress.setPickedCount(3);
progress.setTaskCount(2);
progress.setCompletedTaskCount(1);
progress.setUnresolvedCount(1);
assertThat(LoadingPickItemMapper.InboundProgress.class).isNotInterface();
assertThat(progress.getExpectedCount()).isEqualTo(5);
assertThat(progress.getPickedCount()).isEqualTo(3);
assertThat(progress.getTaskCount()).isEqualTo(2);
assertThat(progress.getCompletedTaskCount()).isEqualTo(1);
assertThat(progress.getUnresolvedCount()).isEqualTo(1);
}
@Test
void completionCheckCoversAllActivePlanItems() throws Exception {
Method method = LoadingPickItemMapper.class.getDeclaredMethod("unfinishedCount", long.class);