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.77 KB | None | 0 0
  1. using Bogus;
  2. using Shouldly;
  3.  
  4. public class SpecialCaseTests
  5. {
  6. private JobInfo CreateRandomJob() {
  7. var faker = new Faker();
  8.  
  9. string title = faker.Name.JobTitle;
  10. string company = faker.Company.CompanyName;
  11. int monthsInJob = faker.Random.Int(1, 4200);
  12.  
  13. return new JobInfo(title, company, monthsInJob);
  14. }
  15.  
  16. private AnalyzerResult Analyze(ResumeInfo resume) {
  17. var provider = new KeywordScoringProvider();
  18. var analyzer = new ResumeAnalyzer(provider);
  19.  
  20. return analyzer.Analyze(resume);
  21. }
  22.  
  23. [Fact]
  24. public void MattElandShouldScoreMaxValue()
  25. {
  26. // Arrange
  27. var resume = new ResumeInfo("Matt Eland");
  28. resume.Jobs.Add(CreateRandomJob());
  29.  
  30. // Act
  31. var result = Analyze(resume);
  32.  
  33. // Assert
  34. result.Score.ShouldBe(int.MaxValue);
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement