Esempio n. 1
0
        public bool IsEqual(VacancyPrimarySkill lhs, VacancyPrimarySkill rhs)
        {
            if (lhs == null)
            {
                if (rhs == null)
                {
                    return(true);
                }

                return(false);
            }
            else
            {
                if (rhs == null)
                {
                    return(false);
                }
            }

            if (lhs.TechSkill != rhs.TechSkill)
            {
                return(false);
            }

            if (lhs.Level != rhs.Level)
            {
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
        public string GetStr(VacancyPrimarySkill skill)
        {
            if (skill == null)
            {
                return(null);
            }

            var result = skill.TechSkill.ToString() + " " + skill.Level.ToString();

            return(result);
        }
Esempio n. 3
0
        public async Task UpdateCandidateStatusTest()
        {
            int status = 3;

            var candidate = new Candidate()
            {
                Id = 18,

                Status = 6,

                HRM = 2
            };

            var newCandidate = new Candidate()
            {
                Id = 18,

                Status = 3,

                HRM = 2
            };

            VacancyPrimarySkill vacancyPrimSkill = new VacancyPrimarySkill();

            mockCandidateRepository.Setup(x => x.Read(It.IsAny <int>())).Returns(candidate);

            mockCandidateRepository.Setup(x => x.Update(It.IsAny <Candidate>())).Returns(candidate);

            var candidateRepository = mockCandidateRepository.Object;

            var unitOfWork = mockUnitOfWork.Object;

            var contactRepository = mockContactRepository.Object;

            var jobContactsRepository = mockJobContactsRepository.Object;

            var statusRepository = mockStatusRepository.Object;

            var vacancyRepository = mockVacancyRepository.Object;

            var eventService = mockEventService.Object;

            var candidateService = new CandidateService(unitOfWork, candidateRepository, contactRepository,
                                                        jobContactsRepository, statusRepository, vacancyRepository, eventService);

            var result = await candidateService.UpdateStatus(candidate.Id, status, candidate.HRM);

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