Fixed no executions returned check and added a unit test

This commit is contained in:
Michael Minella
2013-09-04 20:39:23 -05:00
parent 46f790eb4b
commit c4231c4cc8
2 changed files with 12 additions and 3 deletions

View File

@@ -276,6 +276,15 @@ public class JsrJobOperatorTests {
jsrJobOperator.getParameters(5l);
}
@Test(expected=NoSuchJobException.class)
public void testGetNoRunningExecutions() {
Set<JobExecution> executions = new HashSet<JobExecution>();
when(jobExplorer.findRunningJobExecutions("myJob")).thenReturn(executions);
jsrJobOperator.getRunningExecutions("myJob");
}
@Test
public void testGetRunningExecutions() {
Set<JobExecution> executions = new HashSet<JobExecution>();