Created
September 7, 2019 16:40
-
-
Save IntegerMan/b0d7606fd83b5706ddafc6e8536cae86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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