public void Given_employee_is_risk_assesor_then_return_completed_task()
        {
            //GIVEN
            var employee = new Employee() { Id = Guid.NewGuid(), NotificationType = NotificationType.Daily};
            
            var riskAssessor = new RiskAssessor() { Id = 5596870, Employee = employee };
            var furthcontrolmersuretasks = new FireRiskAssessmentFurtherControlMeasureTask() { TaskStatus = TaskStatus.Completed, TaskCompletedDate = DateTime.Now.AddDays(-1)};
            
            var significantFinding = new SignificantFinding(){};
            significantFinding.FurtherControlMeasureTasks.Add(furthcontrolmersuretasks);
            furthcontrolmersuretasks.SignificantFinding = significantFinding;


            var riskAssessement = FireRiskAssessment.Create("this is the title", "the ref", 1312, null, new UserForAuditing { Id = Guid.NewGuid() });
            riskAssessement.FireRiskAssessmentChecklists[0].FireRiskAssessment.RiskAssessor = riskAssessor;
            
            var user = new UserForAuditing();
            var fireRiskAssessmentChecklist = riskAssessement.FireRiskAssessmentChecklists[0];
            var question = new Question();
            
            var fireAnswer = FireAnswer.Create(fireRiskAssessmentChecklist, question, YesNoNotApplicableEnum.No, "Additional Info", user);
            fireAnswer.SignificantFinding = significantFinding;
            fireAnswer.FireRiskAssessmentChecklist.FireRiskAssessment.RiskAssessor = riskAssessor;

            significantFinding.FireAnswer = fireAnswer;
          
            riskAssessement.FireRiskAssessmentChecklists[0].Answers = new List<FireAnswer>() {fireAnswer};

            _fireRiskAssessments.Add(riskAssessement);

            var target =
                new GetCompletedFireRiskAssessmentFurtherControlMeasureTasksForEmployeeQuery(null);

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

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

        }
        public void Given_employee_is_risk_assessor_and_notification_frequency_is_set_to_weekly_then_return_tasks_since_previous_week()
        {
            //GIVEN
            var employee = new Employee() { Id = Guid.NewGuid(), NotificationType = NotificationType.Weekly, NotificationFrequecy = (int)System.DayOfWeek.Wednesday };

            var riskAssessor = new RiskAssessor() { Id = 5596870, Employee = employee };
            
            var furthcontrolmersuretasks1 = new FireRiskAssessmentFurtherControlMeasureTask()
            {
                TaskStatus = TaskStatus.Completed,
                TaskCompletedDate = DateTime.Now,
                Title = "one"
            };

            var furthcontrolmersuretasks2 = new FireRiskAssessmentFurtherControlMeasureTask()
            {
                TaskStatus = TaskStatus.Completed,
                TaskCompletedDate = DateTime.Now.AddDays(-5),
                Title = "two"
            };

            var furthcontrolmersuretasks3 = new FireRiskAssessmentFurtherControlMeasureTask()
            {
                TaskStatus = TaskStatus.Completed,
                TaskCompletedDate = DateTime.Now.AddDays(-10),
                Title = "three"
            };

            var significantFinding = new SignificantFinding() { };

            significantFinding.FurtherControlMeasureTasks.Add(furthcontrolmersuretasks1);
            significantFinding.FurtherControlMeasureTasks.Add(furthcontrolmersuretasks2);
            significantFinding.FurtherControlMeasureTasks.Add(furthcontrolmersuretasks3);

            furthcontrolmersuretasks1.SignificantFinding = significantFinding;
            furthcontrolmersuretasks2.SignificantFinding = significantFinding;
            furthcontrolmersuretasks3.SignificantFinding = significantFinding;


            var riskAssessement = FireRiskAssessment.Create("this is the title", "the ref", 1312, null, new UserForAuditing { Id = Guid.NewGuid() });
            riskAssessement.FireRiskAssessmentChecklists[0].FireRiskAssessment.RiskAssessor = riskAssessor;

            var user = new UserForAuditing();
            var fireRiskAssessmentChecklist = riskAssessement.FireRiskAssessmentChecklists[0];
            var question = new Question();

            var fireAnswer = FireAnswer.Create(fireRiskAssessmentChecklist, question, YesNoNotApplicableEnum.No, "Additional Info", user);
            fireAnswer.SignificantFinding = significantFinding;
            fireAnswer.FireRiskAssessmentChecklist.FireRiskAssessment.RiskAssessor = riskAssessor;

            significantFinding.FireAnswer = fireAnswer;

            riskAssessement.FireRiskAssessmentChecklists[0].Answers = new List<FireAnswer>() { fireAnswer };

            _fireRiskAssessments.Add(riskAssessement);

            var target =
                new GetCompletedFireRiskAssessmentFurtherControlMeasureTasksForEmployeeQuery(
                    null);

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

            //THEN
            Assert.That(result.Count, Is.EqualTo(2));
            Assert.That(result[0].Title, Is.EqualTo("one"));
            Assert.That(result[1].Title, Is.EqualTo("two"));
        }