public void Given_employee_is_asignee_and_notification_frequency_is_set_to_weekly_then_return_tasks_since_previous_week()
         {
             var employee = new Employee() { NotificationType = NotificationType.Weekly, NotificationFrequecy = (int)System.DayOfWeek.Wednesday };
             var responsibility = new Responsibility() { };
             
             responsibility.ResponsibilityTasks.Add( new ResponsibilityTask()
             {
                 TaskAssignedTo = employee,
                 TaskCompletionDueDate = DateTime.Now.AddDays(-2)
             });

             responsibility.ResponsibilityTasks.Add(new ResponsibilityTask()
             {
                 TaskAssignedTo = employee,
                 TaskCompletionDueDate = DateTime.Now.AddDays(-5)
             });

             responsibility.ResponsibilityTasks.Add(new ResponsibilityTask()
             {
                 TaskAssignedTo = employee,
                 TaskCompletionDueDate = DateTime.Now.AddDays(-15)
             });

             _responsibilities.Add(responsibility);

             var target = new GetOverdueResponsibilitiesTasksForEmployeeQuery(_queryableWrapper.Object);

             //WHEN
             var result = target.Execute(employee.Id, null);

             //THEN
             Assert.That(result.Count, Is.EqualTo(2));
         }
         public void Given_Employee_is_assigned_a_task_then_return_task()
         {
             var employee = new Employee() { Id = Guid.NewGuid(), NotificationType = NotificationType.Daily};
             var responsibilityTask = new ResponsibilityTask()
             {
                 TaskAssignedTo = employee,
                 TaskCompletionDueDate = DateTime.Now.AddDays(-5)
             };

             var responsibility = new Responsibility(){  };
             responsibility.ResponsibilityTasks.Add(responsibilityTask);

             _responsibilities.Add(responsibility);

             var target = new GetOverdueResponsibilitiesTasksForEmployeeQuery(_queryableWrapper.Object);

             //WHEN
             var result = target.Execute(employee.Id, null);

             //THEN
             Assert.That(result.Count, Is.EqualTo(1));
         }
         public void Given_employee_isassignee_and_notification_frequency_is_set_to_monthly_on_26th_then_return_tasks_since_26th_of_previous_month()
         {
             var employee = new Employee() { NotificationType = NotificationType.Monthly, NotificationFrequecy = 26};
             var responsibility = new Responsibility() { };

             responsibility.ResponsibilityTasks.Add(new ResponsibilityTask()
             {
                 TaskAssignedTo = employee,
                 TaskCompletionDueDate = new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(-1).Month, 27), //27th of last month,
             });

             responsibility.ResponsibilityTasks.Add(new ResponsibilityTask()
             {
                 TaskAssignedTo = employee,
                 TaskCompletionDueDate = new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(-1).Month, 28), //28th of last month,
             });

             responsibility.ResponsibilityTasks.Add(new ResponsibilityTask()
             {
                 TaskAssignedTo = employee,
                 TaskCompletionDueDate = new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(-1).Month, 23), //23th of last month,
             });

             _responsibilities.Add(responsibility);

             var target = new GetOverdueResponsibilitiesTasksForEmployeeQuery(_queryableWrapper.Object);

             //WHEN
             var result = target.Execute(employee.Id, null);

             //THEN
             Assert.That(result.Count, Is.EqualTo(2));
         }