private void AssertApplications(IEmployer employer, Guid applicantId, IJobAd jobAd1, IJobAd jobAd2) { var applications = _jobAdApplicantsQuery.GetApplications(employer, applicantId); Assert.AreEqual(2, applications.Count); Assert.IsTrue((from a in applications where a.PositionId == jobAd1.Id && a.ApplicantId == applicantId select a).Any()); Assert.IsTrue((from a in applications where a.PositionId == jobAd2.Id && a.ApplicantId == applicantId select a).Any()); Assert.IsTrue(_jobAdApplicationSubmissionsQuery.HasSubmittedApplication(applicantId, jobAd1.Id)); Assert.IsTrue(_jobAdApplicationSubmissionsQuery.HasSubmittedApplication(applicantId, jobAd2.Id)); var jobAdIds = _jobAdApplicationSubmissionsQuery.GetSubmittedApplicationJobAdIds(applicantId); Assert.AreEqual(2, jobAdIds.Count); Assert.IsTrue((from j in jobAdIds where j == jobAd1.Id select j).Any()); Assert.IsTrue((from j in jobAdIds where j == jobAd2.Id select j).Any()); jobAdIds = _jobAdApplicationSubmissionsQuery.GetSubmittedApplicationJobAdIds(applicantId, new[] { jobAd1.Id }); Assert.AreEqual(1, jobAdIds.Count); Assert.AreEqual(jobAd1.Id, jobAdIds[0]); jobAdIds = _jobAdApplicationSubmissionsQuery.GetSubmittedApplicationJobAdIds(applicantId, new[] { jobAd2.Id }); Assert.AreEqual(1, jobAdIds.Count); Assert.AreEqual(jobAd2.Id, jobAdIds[0]); jobAdIds = _jobAdApplicationSubmissionsQuery.GetSubmittedApplicationJobAdIds(applicantId, new[] { jobAd1.Id, jobAd2.Id }); Assert.AreEqual(2, jobAdIds.Count); Assert.IsTrue((from j in jobAdIds where j == jobAd1.Id select j).Any()); Assert.IsTrue((from j in jobAdIds where j == jobAd2.Id select j).Any()); }
protected ApplicantList GetList(IJobAd jobAd) { return(_contenderListsQuery.GetList <ApplicantList>(jobAd.Id)); }
JobAdProcessing IJobAdProcessingQuery.GetJobAdProcessing(IJobAd jobAd) { return(jobAd.Integration == null || string.IsNullOrEmpty(jobAd.Integration.ExternalApplyUrl) ? JobAdProcessing.ManagedInternally : JobAdProcessing.ManagedExternally); }
ApplicantList IJobAdApplicantsQuery.GetApplicantList(IEmployer employer, IJobAd jobAd) { return(CanAccessList(employer, jobAd) ? EnsureList(jobAd) : null); }
Guid IInternalApplicationsCommand.CreateApplicationWithResume(IMember member, IJobAd jobAd, Guid fileReferenceId, bool useForProfile, string coverLetterText) { return(Create(member.Id, jobAd, coverLetterText, a => a.ResumeFileId = GetResumeFileId(member.Id, fileReferenceId, useForProfile))); }
Guid IInternalApplicationsCommand.CreateApplicationWithLastUsedResume(IMember member, IJobAd jobAd, string coverLetterText) { return(Create(member.Id, jobAd, coverLetterText, a => a.ResumeFileId = GetLastUsedResumeFileId(member.Id))); }
Guid IInternalApplicationsCommand.CreateApplication(IMember member, IJobAd jobAd, string coverLetterText) { return(Create(member.Id, jobAd, coverLetterText, a => SetResume(member.Id, a))); }
private static void AssertApplication(HtmlNode node, IJobAd jobAd) { Assert.AreEqual(jobAd.Id.ToString(), node.Attributes["id"].Value); }