Skip to content

Commit

Permalink
issue #139
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Mar 18, 2016
1 parent 05414e2 commit 8ca4215
Showing 1 changed file with 0 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,45 +65,6 @@ public void testDaysOnLastProcess() throws AccessDeniedException, ProcessingErro

}

/**
* This test the date compare base on timWorkflowLastAccess in workdays
*
* @throws ProcessingErrorException
* @throws AccessDeniedException
*
*/
@Test
public void testWorkdaysOnLastProcess() throws AccessDeniedException, ProcessingErrorException, PluginException {

ItemCollection doc = new ItemCollection();
ItemCollection activity = new ItemCollection();

// delay unit = days
activity.replaceItemValue("keyActivityDelayUnit", "4");
// compare type = last process
activity.replaceItemValue("keyScheduledBaseObject", "1");
// delay
activity.replaceItemValue("numActivityDelay", 10);

Calendar workitemCal = Calendar.getInstance();
workitemCal.setTime(new Date());
// adjust -14
workitemCal.add(Calendar.DAY_OF_MONTH, -14);
// prepare doc
doc.replaceItemValue("timWorkflowLastAccess", workitemCal.getTime());
Assert.assertTrue(WorkflowSchedulerService.workItemInDue(doc, activity));

// delay
activity.replaceItemValue("numActivityDelay", 15);
workitemCal.setTime(new Date());
// adjust -14
workitemCal.add(Calendar.DAY_OF_MONTH, -14);
// prepare doc
doc.replaceItemValue("timWorkflowLastAccess", workitemCal.getTime());
Assert.assertFalse(WorkflowSchedulerService.workItemInDue(doc, activity));

}




Expand Down

0 comments on commit 8ca4215

Please sign in to comment.