JobControlFinderImpl implements JobControlFinder { @Override public BatchJobListResult resolveBatchJobResult(String[] args) { List<BatchJobListResult> resultList = systemDao.selectJobList( LIMIT_ONE_ROWBOUNDS, param); if (resultList == null || resultList.isEmpty()) { return null; } return resultList.get(0); } JobControlFinderImpl(SystemDao systemDao); @Override BatchJobListResult resolveBatchJobResult(String[] args); @Override BatchJobData resolveBatchJobData(String jobSequenceId);  }
@Test public void testResolveBatchJobResult06() { when(((JobControlFinderImpl) jobControlFinder).systemDao .selectJobList(any(RowBounds.class), any(BatchJobListParam.class))).thenReturn( new ArrayList<BatchJobListResult>() { private static final long serialVersionUID = 1L; { add(new BatchJobListResult() { { setJobSequenceId("0000000001"); } }); } }); BatchJobListResult batchJobListResult = jobControlFinder .resolveBatchJobResult(new String[]{"0000000001"}); assertEquals("0000000001", batchJobListResult.getJobSequenceId()); }
@Test public void testResolveBatchJobResult01() { when(((JobControlFinderImpl) jobControlFinder).systemDao .selectJobList(any(RowBounds.class), any(BatchJobListParam.class))).thenReturn( new ArrayList<BatchJobListResult>() { private static final long serialVersionUID = 1L; { add(new BatchJobListResult() { { setJobSequenceId("0000000001"); } }); } }); BatchJobListResult batchJobListResult = jobControlFinder .resolveBatchJobResult(new String[] { "0000000001" }); assertEquals("0000000001", batchJobListResult.getJobSequenceId()); }
@Test public void testResolveBatchJobResult02() { when(((JobControlFinderImpl) jobControlFinder).systemDao .selectJobList(any(RowBounds.class), any(BatchJobListParam.class))) .thenReturn(null); BatchJobListResult batchJobListResult = jobControlFinder .resolveBatchJobResult(new String[] { "0000000001" }); assertNull(batchJobListResult); }
@Test public void testResolveBatchJobResult03() { when(((JobControlFinderImpl) jobControlFinder).systemDao .selectJobList(any(RowBounds.class), any(BatchJobListParam.class))) .thenReturn(new ArrayList<BatchJobListResult>()); BatchJobListResult batchJobListResult = jobControlFinder .resolveBatchJobResult(new String[] { "0000000001" }); assertNull(batchJobListResult); }
@Test public void testResolveBatchJobResult04() { when(((JobControlFinderImpl) jobControlFinder).systemDao .selectJobList(any(RowBounds.class), any(BatchJobListParam.class))).thenReturn( new ArrayList<BatchJobListResult>() { private static final long serialVersionUID = 1L; { add(new BatchJobListResult() { { setJobSequenceId("0000000001"); } }); } }); BatchJobListResult batchJobListResult = jobControlFinder .resolveBatchJobResult(null); assertEquals("0000000001", batchJobListResult.getJobSequenceId()); }
@Test public void testResolveBatchJobResult05() { when(((JobControlFinderImpl) jobControlFinder).systemDao .selectJobList(any(RowBounds.class), any(BatchJobListParam.class))).thenReturn( new ArrayList<BatchJobListResult>() { private static final long serialVersionUID = 1L; { add(new BatchJobListResult() { { setJobSequenceId("0000000001"); } }); } }); BatchJobListResult batchJobListResult = jobControlFinder .resolveBatchJobResult(new String[0]); assertEquals("0000000001", batchJobListResult.getJobSequenceId()); }