public void should_return_most_recent_task() { Timesheet timesheet = new Timesheet(_file); Assert.AreEqual(_task, timesheet.GetLastTask()); }
public void should_append_task_to_file() { Timesheet timesheet = new Timesheet(_file); timesheet.Update(_task); string content = string.Format("{0},{1},{2},\"{3}\",\"{4}\"{5}", _taskDate, _taskDate.DayOfWeek, _task.Duration.TotalHours, _task.Activity, _task.Note, Environment.NewLine); _file.AssertWasCalled(file=>file.AppendAllText(content)); }
public void should_return_empty_task() { Timesheet sut = new Timesheet(_file); Assert.AreEqual(new Task(), sut.GetLastTask()); }
public void should_return_task_contained_in_file() { Timesheet timesheet = new Timesheet(_file); Assert.AreEqual(_task, timesheet.GetLastTask()); }