public void ClosingDateParsedFromHtml() { var parser = new TalentLinkJobAdvertHtmlParser(new TalentLinkSalaryParser(), new TalentLinkWorkPatternParser()); var job = parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual(new DateTime(2017, 01, 29), job.ClosingDate); }
public void DepartmentParsedFromHtml() { var parser = new TalentLinkJobAdvertHtmlParser(new TalentLinkSalaryParser(), new TalentLinkWorkPatternParser()); var job = parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual("Communities, Economy and Transport", job.Department); }
public void JobTypeParsedFromHtml() { var parser = new TalentLinkJobAdvertHtmlParser(new TalentLinkSalaryParser(), new TalentLinkWorkPatternParser()); var job = parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual("Customer Services", job.JobType); }
public void LocationParsedFromHtml() { var parser = new TalentLinkJobAdvertHtmlParser(new TalentLinkSalaryParser(), new TalentLinkWorkPatternParser()); var job = parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual("Lewes", job.Location); }
public void OrganisationParsedFromHtml() { var parser = new TalentLinkJobAdvertHtmlParser(new TalentLinkSalaryParser(), new TalentLinkWorkPatternParser()); var job = parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual("East Sussex County Council", job.Organisation); }
public void ApplyUrlParsedFromHtml() { var parser = new TalentLinkJobAdvertHtmlParser(new TalentLinkSalaryParser(), new TalentLinkWorkPatternParser()); var job = parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual("https://emea3.recruitmentplatform.com/syndicated/private/syd_apply.cfm?id=PFOFK026203F3VBQB7968LOH0&nPostingTargetID=37054&mask=esccext&jdescurl=https:%2F%2Femea3.recruitmentplatform.com%2Fsyndicated%2Flay%2Fjsoutputinitrapido.cfm%3Fcomponent%3Dlay9999_jdesc100a%26ID%3DPFOFK026203F3VBQB7968LOH0%26LG%3DUK%26mask%3Desccext%26browserchk%3Dno%26nPostingTargetID%3D37054", job.ApplyUrl.ToString()); }
public void JobReferenceParsedFromHtml() { var parser = new TalentLinkJobAdvertHtmlParser(new TalentLinkSalaryParser(), new TalentLinkWorkPatternParser()); var job = parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual("CET01739", job.Reference); }
public async Task ContractTypeParsedFromHtml() { var salaryParser = new Mock <ISalaryParser>(); salaryParser.Setup(x => x.ParseSalary(It.IsAny <string>())).Returns(Task.FromResult(new Salary())); var workPatternParser = new Mock <IWorkPatternParser>(); var parser = new TalentLinkJobAdvertHtmlParser(salaryParser.Object, workPatternParser.Object); var job = await parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual("Casual", job.ContractType); }
public async Task DepartmentParsedFromHtml() { var salaryParser = new Mock <ISalaryParser>(); salaryParser.Setup(x => x.ParseSalary(It.IsAny <string>())).Returns(Task.FromResult(new Salary())); var workPatternParser = new Mock <IWorkPatternParser>(); var parser = new TalentLinkJobAdvertHtmlParser(salaryParser.Object, workPatternParser.Object); var job = await parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual("Communities, Economy and Transport", job.Department); }
public async Task OrganisationParsedFromHtml() { var salaryParser = new Mock <ISalaryParser>(); salaryParser.Setup(x => x.ParseSalary(It.IsAny <string>())).Returns(Task.FromResult(new Salary())); var workPatternParser = new Mock <IWorkPatternParser>(); var parser = new TalentLinkJobAdvertHtmlParser(salaryParser.Object, workPatternParser.Object); var job = await parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.AreEqual("East Sussex County Council", job.Organisation); }
public void AdvertTextParsedFromHtml() { var parser = new TalentLinkJobAdvertHtmlParser(new TalentLinkSalaryParser(), new TalentLinkWorkPatternParser()); var job = parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("Casual hours")); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("East Sussex Registration Service")); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("ceremonies take place at weekends")); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("Work Permits")); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("redeployees")); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("Job Description and Person Specification")); }
public async Task ApplyUrlParsedFromHtml() { var salaryParser = new Mock <ISalaryParser>(); salaryParser.Setup(x => x.ParseSalary(It.IsAny <string>())).Returns(Task.FromResult(new Salary())); var workPatternParser = new Mock <IWorkPatternParser>(); var parser = new TalentLinkJobAdvertHtmlParser(salaryParser.Object, workPatternParser.Object); var job = await parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); // The final .Replace() is included because this test seems to switch between encoding and not encoding the : in the querystring parameter Assert.AreEqual("https://emea3.recruitmentplatform.com/syndicated/private/syd_apply.cfm?id=PFOFK026203F3VBQB7968LOH0&nPostingTargetID=37054&mask=esccext&jdescurl=https%3A%2F%2Femea3.recruitmentplatform.com%2Fsyndicated%2Flay%2Fjsoutputinitrapido.cfm%3Fcomponent%3Dlay9999_jdesc100a%26ID%3DPFOFK026203F3VBQB7968LOH0%26LG%3DUK%26mask%3Desccext%26browserchk%3Dno%26nPostingTargetID%3D37054", job.ApplyUrl.ToString().Replace(":%2F", "%3A%2F")); }
public async Task AdvertTextParsedFromHtml() { var salaryParser = new Mock <ISalaryParser>(); salaryParser.Setup(x => x.ParseSalary(It.IsAny <string>())).Returns(Task.FromResult(new Salary())); var workPatternParser = new Mock <IWorkPatternParser>(); var parser = new TalentLinkJobAdvertHtmlParser(salaryParser.Object, workPatternParser.Object); var job = await parser.ParseJob(Properties.Resources.JobAdvert1Html, "example"); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("Casual hours")); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("East Sussex Registration Service")); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("ceremonies take place at weekends")); Assert.IsTrue(job.AdvertHtml.ToHtmlString().Contains("Job Description and Person Specification")); }