public static StartTaskForId ( string id, TaskType type ) : ElmcityUtils.HttpResponse | ||
id | string | |
type | TaskType | |
Результат | ElmcityUtils.HttpResponse |
public void StartTaskForIdYieldsAllocated() { Scheduler.InitTaskForId(testid, test_task_type); Scheduler.StartTaskForId(testid, test_task_type); var task = Scheduler.FetchTaskForId(testid, test_task_type); Assert.AreEqual(TaskStatus.allocated, task.status); }
public void UpdateStartTaskForIdYieldsRunning() { Scheduler.InitTaskForId(testid, test_task_type); Scheduler.StartTaskForId(testid, test_task_type); Scheduler.UpdateStartTaskForId(testid, test_task_type); var task = Scheduler.FetchTaskForId(testid, test_task_type); Assert.AreEqual(TaskStatus.running, task.status); }
public void StopTaskForIdYieldsStopTimeGreaterThanStartTime() { Scheduler.InitTaskForId(testid, test_task_type); Scheduler.StartTaskForId(testid, test_task_type); Utils.Wait(3); Scheduler.StopTaskForId(testid, test_task_type); var task = Scheduler.FetchTaskForId(testid, test_task_type); Assert.Greater(task.stop, task.start); }