public async Task TwoNumbersWithCurrencyIsParsed(string parseThis, int minimum, int maximum) { var parser = new TalentLinkSalaryFromDescriptionParser(); var result = await parser.ParseSalary(parseThis); Assert.AreEqual(minimum, result.MinimumSalary); Assert.AreEqual(maximum, result.MaximumSalary); }
public async Task UnrecognisedTextAssumedToBeScaleName() { var parseThis = "Teachers' Pay Scale"; var parser = new TalentLinkSalaryFromDescriptionParser(); var result = await parser.ParseSalary(parseThis); Assert.AreEqual("Teachers' Pay Scale", result.SalaryRange); }
public async Task TwoNumbersAndOverIsParsed() { var parseThis = "£50,000 and over"; var parser = new TalentLinkSalaryFromDescriptionParser(); var result = await parser.ParseSalary(parseThis); Assert.AreEqual(50000, result.MinimumSalary); Assert.AreEqual(null, result.MaximumSalary); }
public async Task SalaryWithPenceIsParsed() { var parseThis = "6752.5 - 6752.5 GBP Year"; var parser = new TalentLinkSalaryFromDescriptionParser(); var result = await parser.ParseSalary(parseThis); Assert.AreEqual(6752, result.MinimumSalary); Assert.AreEqual(6752, result.MaximumSalary); }
public async Task PrefixThenOneNumberGbpYearIsParsed() { var parseThis = "To 29033 GBP Year"; var parser = new TalentLinkSalaryFromDescriptionParser(); var result = await parser.ParseSalary(parseThis); Assert.AreEqual(29033, result.MinimumSalary); Assert.AreEqual(29033, result.MaximumSalary); }
public async Task TwoNumbersGbpYearIsParsed() { var parseThis = "16875 - 17891 GBP Year"; var parser = new TalentLinkSalaryFromDescriptionParser(); var result = await parser.ParseSalary(parseThis); Assert.AreEqual(16875, result.MinimumSalary); Assert.AreEqual(17891, result.MaximumSalary); }