public void Ok()
        {
            var viewModel = new TraineeshipApplicationViewModel
            {
                Candidate     = new TraineeshipCandidateViewModel(),
                VacancyDetail = new TraineeshipVacancyDetailViewModel()
            };

            var response = Mediator.AddEmptyWorkExperienceRows(viewModel);

            response.AssertCode(TraineeshipApplicationMediatorCodes.AddEmptyWorkExperienceRows.Ok, true);
        }
Beispiel #2
0
        public void WillRemoveEmptyWorkExperienceRows()
        {
            var viewModel = new ApprenticeshipApplicationViewModel
            {
                Candidate     = CreateCandidateWithOneWorkExerienceAndTwoEmptyWorkExperiences(),
                VacancyDetail = new VacancyDetailViewModel()
            };

            var response = Mediator.AddEmptyWorkExperienceRows(viewModel);

            response.AssertCode(ApprenticeshipApplicationMediatorCodes.AddEmptyWorkExperienceRows.Ok, true);
            response.ViewModel.Candidate.WorkExperience.Should().HaveCount(1);
        }