Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using Bogus;
  2.  
  3. public abstract class ResumeTestsBase
  4. {
  5.  
  6. private Faker _faker;
  7. protected Faker Faker => _faker ?? _faker = new Faker();
  8.  
  9. protected JobInfo CreateRandomJob(int monthsInJob = -1) {
  10. string title = Faker.Name.JobTitle;
  11. string company = Faker.Company.CompanyName;
  12.  
  13. // Ensure we have a valid months in job if not specified
  14. if (monthsInJob <= 0) {
  15. monthsInJob = Faker.Random.Int(1, 4200);
  16. }
  17.  
  18. return new JobInfo(title, company, monthsInJob);
  19. }
  20.  
  21. protected AnalyzerResult Analyze(ResumeInfo resume) {
  22. var provider = new KeywordScoringProvider();
  23. var analyzer = new ResumeAnalyzer(provider);
  24.  
  25. return analyzer.Analyze(resume);
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement