Esempio n. 1
0
        public void GetExperiencesExperienceById_TryToGetValue_ShouldReturnSomeValue()
        {
            var ResumesExperience = new ResumesExperience {
                Id = It.IsAny <int>(), ResumeId = It.IsAny <int>()
            };

            uow.Setup(x => x.ResumesExperiences.Get(It.IsAny <int>())).Returns(ResumesExperience);

            // act & assert
            NUnit.Framework.Assert.IsNotNull(expService.GetExperienceById(It.IsAny <int>()));
        }
Esempio n. 2
0
        public List <Applicant> GetAllApplicants()
        {
            List <Applicant> applicantList = null;

            DataProvider.ExecuteCmd(GetConnection, "dbo.Applicant_GetAll"
                                    , inputParamMapper : null
                                    , map : delegate(IDataReader reader, short set)
            {
                int transactionId   = 0;
                Applicant applicant = MapApplicant(reader, out transactionId);

                if (applicantList == null)
                {
                    applicantList = new List <Applicant>();
                }

                applicant.Experience = _experienceService.GetExperienceById(applicant.ApplicantKey);
                applicant.Interest   = _interestService.GetInterestById(applicant.ApplicantKey);

                applicantList.Add(applicant);
            }
                                    );
            return(applicantList);
        }
Esempio n. 3
0
        private ExperienceViewModel GetExperience(string userId, string experienceId)
        {
            var experience = _experienceService.GetExperienceById(userId, experienceId);

            if (experience == null)
            {
                return(null);
            }


            var result = new ExperienceViewModel()
            {
                Id        = experience.Id,
                Title     = experience.Title,
                Company   = experience.Company,
                Summary   = experience.Summary,
                Location  = experience.Location,
                StartDate = experience.StartDate,
                EndDate   = experience.EndDate,
                IsCurrent = experience.IsCurrent
            };

            return(result);
        }