public void TestCreateRelocations() { var candidate0 = new Candidate { Id = Guid.NewGuid(), RelocationLocations = null, }; _candidatesCommand.CreateCandidate(candidate0); var candidate1 = new Candidate { Id = Guid.NewGuid(), RelocationLocations = new List <LocationReference> { _armadale.Clone(), _malvern.Clone(), } }; _candidatesCommand.CreateCandidate(candidate1); var candidate2 = new Candidate { Id = Guid.NewGuid(), RelocationLocations = new List <LocationReference> { _tasmania.Clone() } }; _candidatesCommand.CreateCandidate(candidate2); AssertRelocationLocations(candidate0.Id); AssertRelocationLocations(candidate1.Id, _armadale, _malvern); AssertRelocationLocations(candidate2.Id, _tasmania); AssertRelocationLocations(candidate0.Id, new LocationReference[0], candidate1.Id, new[] { _armadale, _malvern }); AssertRelocationLocations(candidate0.Id, new LocationReference[0], candidate2.Id, new[] { _tasmania }); AssertRelocationLocations(candidate1.Id, new[] { _armadale, _malvern }, candidate2.Id, new[] { _tasmania }); }
protected override void OnCloned() { base.OnCloned(); var keywords = GetValue <string>(KeywordsName); SetKeywords(keywords); CompanyKeywordsExpression = Expression.Parse(CompanyKeywords); EducationKeywordsExpression = Expression.Parse(EducationKeywords); DesiredJobTitleExpression = Expression.Parse(DesiredJobTitle); _locationReference = _locationReference == null ? null : _locationReference.Clone(); JobTitleExpression = Expression.Parse(JobTitle); }
public static JobAd CreateTestJobAd(this AnonymousUser user, string title, string content, Industry industry, LocationReference location) { return(new JobAd { Status = JobAdStatus.Open, PosterId = user.Id, Visibility = { HideContactDetails = false, HideCompany = false, }, ContactDetails = new ContactDetails { FirstName = null, LastName = null, EmailAddress = "*****@*****.**", SecondaryEmailAddresses = null, FaxNumber = "8508 9191", PhoneNumber = null }, Title = title, LogoId = null, Description = { Content = content, CompanyName = "Great users", PositionTitle = title, ResidencyRequired = true, JobTypes = JobTypes.FullTime, Industries = new List <Industry> { industry }, Summary = "", Salary = new Salary { LowerBound = 2000,UpperBound= 3000, Rate = SalaryRate.Year, Currency = Currency.AUD }, Package = null, BulletPoints = new[] { "good verbal communication","self management and independency", "bullet point 3" }, Location = location == null ? null : location.Clone() } }); }
protected override void OnCloned() { base.OnCloned(); _locationReference = _locationReference == null ? null : _locationReference.Clone(); AdTitleExpression = Expression.Parse(AdTitle); var keywords = GetValue <string>(KeywordsName); SetKeywords(keywords); AdvertiserNameExpression = Expression.Parse(AdvertiserName); var relocations = Relocations; if (relocations != null) { Relocations = new List <LocationReference>(); foreach (var relocation in relocations) { Relocations.Add(relocation.Clone()); } } }
protected Guid PreLoadJobAds() { const string jobPosterFax = "0385089191"; const string jobPosterPhone = "0385089111"; var contact1 = new ContactDetails { FirstName = "Karl", LastName = "Heinz", EmailAddress = "*****@*****.**", SecondaryEmailAddresses = null, FaxNumber = jobPosterFax, PhoneNumber = jobPosterPhone }; var contact2 = new ContactDetails { FirstName = null, LastName = null, EmailAddress = "*****@*****.**", SecondaryEmailAddresses = null, FaxNumber = null, PhoneNumber = "" }; var employer = _employerAccountsQuery.GetEmployer(TestEmployerUserId); var industries = Resolve <IIndustriesQuery>().GetIndustries(); var melbourne = new LocationReference(); _locationQuery.ResolveLocation(melbourne, Australia, "3000"); // load job ads var newJobAd1 = CreateNewJobAd("Amazing opportunity joining a reknowned company", JobAdStatus.Open, employer, false, contact1, "1st summary", "bulletpoint1", "bulletpoint2", "bulletpoint3", null, "Biz Analyst", "Biz Analyst", JobTypes.FullTime, true, "Ref01", string.Empty, "45000", "car", new List <Industry> { industries[0], industries[1] }, "BMW", melbourne.Clone(), DateTime.Now.AddDays(20)); Guid jobAdId1 = newJobAd1.Id; newJobAd1.Integration.ExternalReferenceId = string.Format("ref{0}:{1}:{2}", DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Millisecond); var newJobAd2 = CreateNewJobAd("Work with the best", JobAdStatus.Open, employer, false, contact2, "2ND SUMMARY", "BULLETPOINT1", "BULLETPOINT2", "BULLETPOINT3", null, "Experienced Team Leader Required - top $$$", "Project Leader", JobTypes.Contract, false, "REF02", "90000", "80000", "MOBILE PHONE", new List <Industry> { industries[2], industries[3] }, "TOYOTA", melbourne.Clone(), DateTime.Now.AddDays(30)); newJobAd2.Integration.ExternalReferenceId = string.Format("ref{0}:{1}:{2}", DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Millisecond); newJobAd2.LastUpdatedTime = DateTime.Now.AddDays(5); _jobAdsCommand.UpdateJobAd(newJobAd2); return(jobAdId1); }