public void AttachSourcesOfIgnitionToRiskAssessment(AttachSourceOfIgnitionToRiskAssessmentRequest request)
        {
            _log.Add(request);

            var user = _userForAuditingRepository.GetByIdAndCompanyId(request.UserId, request.CompanyId);
            var riskAssessment = _fireRiskAssessmentRepository.GetByIdAndCompanyId(request.RiskAssessmentId, request.CompanyId);

            var sourceOfIgnitions = _sourceOfIgnitionRepository.GetByIds(request.SourceOfIgnitionIds);

            riskAssessment.AttachSourceOfIgnitionsToRiskAssessment(sourceOfIgnitions, user);

            _fireRiskAssessmentRepository.SaveOrUpdate(riskAssessment);

        }
        public void Given_valid_request_When_AttachPeopleAtRisk_is_called_Then_should_call_appropiate_methods()
        {
            //Given
            var riskAssessmentService = CreateRiskAssessmentService();
            var request = new AttachSourceOfIgnitionToRiskAssessmentRequest()
                                                                {
                                                                    SourceOfIgnitionIds = new List<long> { 1, 2, 3 },
                                                                    RiskAssessmentId = 2,
                                                                    CompanyId = 1,
                                                                    UserId = Guid.NewGuid()
                                                                };

            var mockRiskAssessment = new Mock<FireRiskAssessment>();
            _riskAssessmentRepository
                .Setup(rr => rr.GetByIdAndCompanyId(request.RiskAssessmentId, request.CompanyId))
                .Returns(mockRiskAssessment.Object);

            var sourceOfIgnitions = new List<SourceOfIgnition>()
                                                {
                                                    new SourceOfIgnition(),
                                                    new SourceOfIgnition(),
                                                    new SourceOfIgnition()
                                                };
            _sourceOfIgnitionRepository
                .Setup(x => x.GetByIds(request.SourceOfIgnitionIds))
                .Returns(sourceOfIgnitions);

            _userRepository
                .Setup(x => x.GetByIdAndCompanyId(request.UserId, request.CompanyId))
                .Returns(_user);

            //When
            riskAssessmentService.AttachSourcesOfIgnitionToRiskAssessment(request);

            //Then
            _riskAssessmentRepository.Verify(x => x.SaveOrUpdate(mockRiskAssessment.Object));
            _userRepository.Verify(x => x.GetByIdAndCompanyId(request.UserId, request.CompanyId));
            mockRiskAssessment.Verify(x => x.AttachSourceOfIgnitionsToRiskAssessment(sourceOfIgnitions, _user));
        }