public void When_new_checklist_generation_Then_display_employees_without_email_first()
        {
            _employeeService.Setup(x => x.GetAll(_companyId)).
              Returns(_employees);
            
            // Given
            _target = GetTarget();

            // When
            var viewModel = _target
                .WithRiskAssessorEmail(_riskAssessorEmail)
                .WithCompanyId(_companyId)
                .WithCurrentUserId(_currentUserId)
                .GetViewModel();

            var emails = viewModel.MultiSelectedEmployees.Select(x => x.Email).ToList();
            
            // Then
            Assert.That(emails.ElementAt(0), Is.Null);
            Assert.That(string.IsNullOrEmpty(emails.ElementAt(1)), Is.True);
            Assert.That(emails.ElementAt(2), Is.Null);
            Assert.That(emails.ElementAt(3), Is.Null);
            Assert.That(string.IsNullOrEmpty(emails.ElementAt(4)), Is.False);
            Assert.That(string.IsNullOrEmpty(emails.ElementAt(5)), Is.False);
        }
        public void When_new_checklist_generation_Then_display_employees_without_email_first_and_order_by_surname()
        {
            _employeeService.Setup(x => x.GetAll(_companyId)).
              Returns(_employees);

            // Given
            _target = GetTarget();

            // When
            var viewModel = _target
                .WithRiskAssessorEmail(_riskAssessorEmail)
                .WithCompanyId(_companyId)
                .WithCurrentUserId(_currentUserId)
                .GetViewModel();

            var employees = viewModel.MultiSelectedEmployees.Select(x => x.Name).ToList();

            // Then
            Assert.That(employees.ElementAt(0), Is.EqualTo("Barry Brown")); // NO EMAIL ADDRESS
            Assert.That(employees.ElementAt(1), Is.EqualTo("cyril cyan")); // EMPTY EMAIL ADDRESS
            Assert.That(employees.ElementAt(2), Is.EqualTo("rachel red"));  // NO EMAIL ADDRESS
            Assert.That(employees.ElementAt(3), Is.EqualTo("Xavi Xander")); // NO EMAIL ADDRESS
            Assert.That(employees.ElementAt(4), Is.EqualTo("Armstrong Armstrong")); // EMAIL ADDRESS
            Assert.That(employees.ElementAt(5), Is.EqualTo("percy purple")); // EMAIL ADDRESS
        }
        public void When_new_checklist_generation_Then_accept_risk_assessor_email()
        {
            // Given
            _target = GetTarget();

            // When
            var viewModel = _target
                .WithRiskAssessorEmail(_riskAssessorEmail)
                .WithCompanyId(_companyId)
                .WithCurrentUserId(_currentUserId)
                .GetViewModel();

            // Then
            Assert.That(viewModel.CompletionNotificationEmailAddress, Is.EqualTo(_riskAssessorEmail));
        }