Exemplo n.º 1
0
        public async Task UpdateVacancyStatusTest()
        {
            int status = 4;

            var vacancy = new Vacancy()
            {
                Id = 18,

                Status = 1,

                HRM = 2
            };

            var newVacancy = new Vacancy()
            {
                Id = 18,

                Status = 4,

                HRM = 2
            };

            mockVacancyRepository.Setup(x => x.Read(It.IsAny <int>())).Returns(vacancy);

            var candidateRepository = mockCandidateRepository.Object;

            var unitOfWork = mockUnitOfWork.Object;

            var candidateService = mockCandidateService.Object;

            var techSkillRepository = mockTechSkillRepository.Object;

            var vacancyRepository = mockVacancyRepository.Object;

            var eventService = mockEventService.Object;

            var vacancyService = new VacancyService(unitOfWork, vacancyRepository, candidateRepository, techSkillRepository,
                                                    candidateService, eventService);

            var result = await vacancyService.UpdateStatus(vacancy.Id, status, vacancy.HRM);

            Assert.AreEqual(newVacancy.Status, result.Status);
        }