| | |
| | | |
| | | @Test |
| | | @SuppressWarnings("unchecked") |
| | | void buildEmptyPalletSearchLocTypes_forLowLoc_returnsConfiguredFallbackOrder() { |
| | | void buildEmptyPalletSearchLocTypes_forLowLoc_fallsBackToLocType1ThreeAfterNarrowLocs() { |
| | | LocTypeDto locTypeDto = new LocTypeDto(); |
| | | locTypeDto.setLocType1((short) 1); |
| | | locTypeDto.setLocType2((short) 1); |
| | |
| | | List<LocTypeDto> stages = ReflectionTestUtils.invokeMethod( |
| | | commonService, "buildEmptyPalletSearchLocTypes", locTypeDto); |
| | | |
| | | assertEquals(4, stages.size()); |
| | | assertEquals(3, stages.size()); |
| | | assertEquals(Short.valueOf((short) 1), stages.get(0).getLocType1()); |
| | | assertEquals(Short.valueOf((short) 1), stages.get(0).getLocType2()); |
| | | assertEquals(Short.valueOf((short) 1), stages.get(1).getLocType1()); |
| | | org.junit.jupiter.api.Assertions.assertNull(stages.get(1).getLocType2()); |
| | | assertEquals(Short.valueOf((short) 2), stages.get(2).getLocType1()); |
| | | assertEquals(Short.valueOf((short) 1), stages.get(2).getLocType2()); |
| | | assertEquals(Short.valueOf((short) 2), stages.get(3).getLocType1()); |
| | | org.junit.jupiter.api.Assertions.assertNull(stages.get(3).getLocType2()); |
| | | assertEquals(Short.valueOf((short) 2), stages.get(3).getLocType3()); |
| | | assertEquals(Short.valueOf((short) 2), stages.get(1).getLocType1()); |
| | | assertEquals(Short.valueOf((short) 1), stages.get(1).getLocType2()); |
| | | assertEquals(Short.valueOf((short) 3), stages.get(2).getLocType1()); |
| | | assertEquals(Short.valueOf((short) 0), stages.get(2).getLocType2()); |
| | | assertEquals(Short.valueOf((short) 2), stages.get(2).getLocType3()); |
| | | } |
| | | } |