use of org.kie.server.api.model.taskassigning.TaskInputVariablesReadMode in project droolsjbpm-integration by kiegroup.
the class TaskAssigningRuntimeDelegateTest method findTasks.
@Test
public void findTasks() {
List<String> status = Collections.singletonList(convertToString(Status.Ready));
List<Status> internalStatus = Collections.singletonList(Status.Ready);
LocalDateTime lastModificationDate = LocalDateTime.now();
TaskInputVariablesReadMode mode = TaskInputVariablesReadMode.READ_FOR_ALL;
TaskDataList taskDataList = new TaskDataList();
LocalDateTime queryTime = LocalDateTime.now();
taskDataList.setQueryTime(queryTime);
when(runtimeClient.findTasks(eq(0L), eq(status), eq(lastModificationDate), anyInt(), anyInt(), eq(mode))).thenReturn(taskDataList);
TaskAssigningRuntimeDelegate.FindTasksResult result = delegate.findTasks(internalStatus, lastModificationDate, mode);
verify(runtimeClient).findTasks(eq(0L), eq(status), eq(lastModificationDate), anyInt(), anyInt(), eq(mode));
assertTrue(result.getTasks().isEmpty());
assertEquals(queryTime, result.getQueryTime());
}
Aggregations