コード例 #1
0
        public void InteruptTask_MovesItemFromWorkInProgressToWaiting()
        {
            sut.CreateTask(taskId, TaskDescription);
            IEnumerable <Task> initialBacklogTasks = sut.GetBacklogTasks();
            var id = initialBacklogTasks.First().Id;

            sut.SheduleTask(id);
            sut.BeginWorkOnTask(id);

            sut.InterruptTask(id);

            IEnumerable <Task> waitingTasks    = sut.GetWaitingTasks();
            IEnumerable <Task> tasksInProgress = sut.GetTasksInProgress();

            waitingTasks.First().Description.ShouldEqual(TaskDescription);
            tasksInProgress.Count().ShouldEqual(0);
        }