Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created September 7, 2019 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/b0d7606fd83b5706ddafc6e8536cae86 to your computer and use it in GitHub Desktop.
Save IntegerMan/b0d7606fd83b5706ddafc6e8536cae86 to your computer and use it in GitHub Desktop.
using Bogus;
public abstract class ResumeTestsBase
{
private Faker _faker;
protected Faker Faker => _faker ?? _faker = new Faker();
protected JobInfo CreateRandomJob(int monthsInJob = -1) {
string title = Faker.Name.JobTitle;
string company = Faker.Company.CompanyName;
// Ensure we have a valid months in job if not specified
if (monthsInJob <= 0) {
monthsInJob = Faker.Random.Int(1, 4200);
}
return new JobInfo(title, company, monthsInJob);
}
protected AnalyzerResult Analyze(ResumeInfo resume) {
var provider = new KeywordScoringProvider();
var analyzer = new ResumeAnalyzer(provider);
return analyzer.Analyze(resume);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment