Exemplo n.º 1
0
        public void WhenMappingIsNationwide(int vacancyLocationTypeid, bool expectedResult)
        {
            var vacancy = new TraineeshipVacancy()
            {
                VacancyLocationTypeId = vacancyLocationTypeid,
                Location = new Address()
            };

            var result = _sut.MapToTraineeshipVacancy(vacancy);

            result.IsNationwide.Should().Be(expectedResult);
        }
Exemplo n.º 2
0
        public void WhenMappingApplicationUrl_ThenMapFromEmployersRecruitmentWebsite()
        {
            string expectedUrl = "https://" + Guid.NewGuid();
            var    vacancy     = new TraineeshipVacancy
            {
                EmployersRecruitmentWebsite = expectedUrl,
                Location = new Address()
            };

            TraineeshipVacancyDto result = _sut.MapToTraineeshipVacancy(vacancy);

            result.ApplicationUrl.Should().Be(expectedUrl);
        }
Exemplo n.º 3
0
        public void WhenMappingApplicationInstructions_ThenMapFromEmployersApplicationInstructions()
        {
            string expectedInstructions = Guid.NewGuid().ToString();
            var    vacancy = new TraineeshipVacancy
            {
                EmployersApplicationInstructions = expectedInstructions,
                Location = new Address()
            };

            TraineeshipVacancyDto result = _sut.MapToTraineeshipVacancy(vacancy);

            result.ApplicationInstructions.Should().Be(expectedInstructions);
        }
Exemplo n.º 4
0
        public void WhenMappingEmployerWebsite(string anonymousEmployerName)
        {
            var vacancy = new TraineeshipVacancy()
            {
                EmployerWebsite       = "www.google.com",
                AnonymousEmployerName = anonymousEmployerName,
                Location = new Address()
            };

            var expectedEmployerWebsite =
                string.IsNullOrWhiteSpace(vacancy.AnonymousEmployerName) ? vacancy.EmployerWebsite : null;

            var result = _sut.MapToTraineeshipVacancy(vacancy);

            result.EmployerWebsite.Should().Be(expectedEmployerWebsite);
        }
Exemplo n.º 5
0
        public void WhenMappingEmployerDescription(string anonymousEmployerName)
        {
            var vacancy = new TraineeshipVacancy()
            {
                AnonymousEmployerDescription = "Anonymous Employer Desc",
                EmployerDescription          = "Employer Desc",
                AnonymousEmployerName        = anonymousEmployerName,
                Location = new Address()
            };

            var expectedEmployerDescription =
                string.IsNullOrWhiteSpace(vacancy.AnonymousEmployerName) ? vacancy.EmployerDescription : vacancy.AnonymousEmployerDescription;

            var result = _sut.MapToTraineeshipVacancy(vacancy);

            result.EmployerDescription.Should().Be(expectedEmployerDescription);
        }