public void Given_Employee_is_assignee_task_due_in_2_days_and_notified_daily_then_dont_return_due_tomorrow_responsibility_task() { var employee = new Employee() { Id = Guid.NewGuid(), NotificationType = NotificationType.Daily }; var responsibilityTask = new ResponsibilityTask() { TaskAssignedTo = employee, TaskStatus = TaskStatus.Outstanding, TaskCompletedDate = null, TaskCompletionDueDate = DateTime.Now.AddDays(2) }; var responsibility = new Responsibility() { }; responsibility.ResponsibilityTasks.Add(responsibilityTask); _responsibilities.Add(responsibility); var target = new GetDueResponsibilityTasksForEmployeeQuery(_queryableWrapper.Object); //WHEN var result = target.Execute(employee.Id, null); //THEN Assert.That(result.Count, Is.EqualTo(0)); }
public void Given_notification_set_to_weekly_and_task_is_due_in_less_than_a_week_return_task() { var employee = new Employee() { Id = Guid.NewGuid(), NotificationType = NotificationType.Weekly}; var responsibilityTask = new ResponsibilityTask() { TaskAssignedTo = employee, TaskStatus = TaskStatus.Outstanding, TaskCompletedDate = null, TaskCompletionDueDate = DateTime.Now.AddDays(5) }; var responsibility = new Responsibility() { }; responsibility.ResponsibilityTasks.Add(responsibilityTask); _responsibilities.Add(responsibility); var target = new GetDueResponsibilityTasksForEmployeeQuery(_queryableWrapper.Object); //WHEN var result = target.Execute(employee.Id, null); //THEN Assert.That(result.Count, Is.EqualTo(1)); }