public void GivenJobWithTwoTasks__WhenRunningJob__ShouldExecuteAllTasks() { Job sut = new Job("job"); TaskSpy firstTask = new TaskSpy(); TaskSpy secondTask = new TaskSpy(); sut.AddTask(firstTask); sut.AddTask(secondTask); sut.Run(); AssertTaskWasRun(firstTask); AssertTaskWasRun(secondTask); }
private void TaskAdded(ITaskViewModel taskVm) { Job.AddTask(taskVm.Task); }