taskManual.setEnabled(true);
taskManual.setTypeId(scheduledTask.getTypeId());
taskManual.setProperties(scheduledTask.getProperties());
taskManual.setSchedule("manual");
Status status = TaskScheduleUtil.update(taskManual);
Assert.assertTrue(status.isSuccess());
}
else {
ScheduledServiceOnceResource updatedTask = new ScheduledServiceOnceResource();
updatedTask.setId(task.getId());
updatedTask.setName(scheduledTask.getName());
updatedTask.setEnabled(task.isEnabled());
updatedTask.setTypeId(scheduledTask.getTypeId());
updatedTask.setProperties(scheduledTask.getProperties());
updatedTask.setSchedule("once");
Date startDate = DateUtils.addDays(new Date(), 10);
startDate = DateUtils.round(startDate, Calendar.DAY_OF_MONTH);
updatedTask.setStartDate(String.valueOf(startDate.getTime()));
updatedTask.setStartTime("03:30");
Status status = TaskScheduleUtil.update(updatedTask);
Assert.assertTrue(status.isSuccess());
}
assertTasks();
}