StartTaskForId() public static method

public static StartTaskForId ( string id, TaskType type ) : ElmcityUtils.HttpResponse
id string
type TaskType
return ElmcityUtils.HttpResponse
示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }