public void CanGetOverdueUserTasks() { var list = new List<TaskHeader> { new TaskHeader {TaskId = 1, Description = "Test1", StartDate = DateTime.Today, UserName = "******"}, new TaskHeader {TaskId = 2, Description = "Test2", StartDate = DateTime.Today.AddDays(5), UserName = "******"}, new TaskHeader {TaskId = 3, Description = "Test3", StartDate = DateTime.Today.AddDays(-7), UserName = "******"}, new TaskHeader {TaskId = 4, Description = "Test4", StartDate = DateTime.Today.AddDays(-10), UserName = "******"}, new TaskHeader {TaskId = 5, Description = "Test5", StartDate = DateTime.Today.AddDays(-10), UserName = "******"}, }; var c = new TaskHeaderController(); var result = c.GetOverdueUserTasks(list, "YOU"); Assert.AreEqual(1, result.Count); Assert.AreEqual(5, result[0].TaskId); }
public void CanGetOverdueUserTasksForNullList() { var c = new TaskHeaderController(); var result = c.GetOverdueUserTasks(null, "YOU"); Assert.IsNotNull(result); }