自动化立体仓库 - WMS系统
src/test/java/com/zy/common/service/CommonServiceLocTypeStrategyTest.java
@@ -160,4 +160,18 @@
        assertEquals(Short.valueOf((short) 0), stages.get(2).getLocType2());
        assertEquals(Short.valueOf((short) 2), stages.get(2).getLocType3());
    }
    @Test
    void matchesTargetLev_shouldOnlyAcceptRequestedLevel() {
        LocMast locMast = new LocMast();
        locMast.setLev1(8);
        Boolean matchEight = ReflectionTestUtils.invokeMethod(commonService, "matchesTargetLev", locMast, 8);
        Boolean matchSeven = ReflectionTestUtils.invokeMethod(commonService, "matchesTargetLev", locMast, 7);
        Boolean matchNull = ReflectionTestUtils.invokeMethod(commonService, "matchesTargetLev", locMast, null);
        assertTrue(Boolean.TRUE.equals(matchEight));
        assertFalse(Boolean.TRUE.equals(matchSeven));
        assertTrue(Boolean.TRUE.equals(matchNull));
    }
}