| | |
| | | } |
| | | |
| | | @Test |
| | | void receviceTaskFromWcs_marksMoveCompleteWhenTaskCompleteUsesCrnNotifyType() { |
| | | WrkMast mast = moveMast(11); |
| | | when(wrkMastService.selectOne(any())).thenReturn(mast); |
| | | when(wrkMastService.updateById(mast)).thenReturn(true); |
| | | |
| | | service.receviceTaskFromWcs(new ReceviceTaskParams() |
| | | .setNotifyType("Crn") |
| | | .setMsgType("task_complete") |
| | | .setSuperTaskNo("7597")); |
| | | |
| | | assertEquals(Long.valueOf(4L), mast.getWrkSts()); |
| | | verify(wrkMastService).updateById(mast); |
| | | } |
| | | |
| | | @Test |
| | | void receviceTaskFromWcs_marksChangeLocCompleteWhenTaskCompleteUsesCrnNotifyType() { |
| | | WrkMast mast = moveMast(5); |
| | | when(wrkMastService.selectOne(any())).thenReturn(mast); |
| | | when(wrkMastService.updateById(mast)).thenReturn(true); |
| | | |
| | | service.receviceTaskFromWcs(new ReceviceTaskParams() |
| | | .setNotifyType("Crn") |
| | | .setMsgType("task_complete") |
| | | .setSuperTaskNo("7597")); |
| | | |
| | | assertEquals(Long.valueOf(4L), mast.getWrkSts()); |
| | | verify(wrkMastService).updateById(mast); |
| | | } |
| | | |
| | | @Test |
| | | @SuppressWarnings("unchecked") |
| | | void buildReassignCrnSearchOrder_currentThree_shouldSearchSmallerThenWrapDescending() { |
| | | List<Integer> result = ReflectionTestUtils.invokeMethod( |
| | |
| | | return mast; |
| | | } |
| | | |
| | | private static WrkMast moveMast(Integer ioType) { |
| | | WrkMast mast = new WrkMast(); |
| | | mast.setWrkNo(7597); |
| | | mast.setIoType(ioType); |
| | | mast.setWrkSts(2L); |
| | | return mast; |
| | | } |
| | | |
| | | private static WrkMast inboundMast(Integer crnNo, String locNo) { |
| | | WrkMast mast = new WrkMast(); |
| | | mast.setWrkNo(7597); |