internal void Add(Task task) { if (null == task) { throw new ArgumentNullException("task"); } InnerList.Add(task); }
public AddTaskCommand(Guid projectID, Task task) { if (null == task) { throw new ArgumentNullException("task"); } _projectID = projectID; _task = task; }
public void TestAddTask() { Project project = new Project("Artigos"); ExecuteCommand(new AddProjectCommand(project)); Task task = new Task("Preval�ncia de Objetos"); ExecuteCommand(new AddTaskCommand(project.ID, task)); AssertEquals(1, project.Tasks.Count); AssertSame(task, project.Tasks[0]); }
private void _cmdOK_Click(object sender, System.EventArgs e) { Task task = new Task(_txtTitle.Text); _task = task; }
public void TestAddWorkRecord() { Project project = new Project("Artigos"); ExecuteCommand(new AddProjectCommand(project)); Task task = new Task("Preval�ncia de Objetos"); ExecuteCommand(new AddTaskCommand(project.ID, task)); DateTime startTime = new DateTime(2003, 6, 29, 13, 26, 0); DateTime endTime = startTime.AddHours(5); WorkRecord record = new WorkRecord(startTime, endTime); ExecuteCommand(new AddWorkRecordCommand(project.ID, task.ID, record)); AssertEquals(1, task.WorkRecords.Count); AssertSame(record, task.WorkRecords[0]); }