Esempio n. 1
0
  @Test
  public void thereCanBeMoreThanOneJobseekersWithSameName() {
    Recruiter recruiter1 = Recruiter.named("George");
    Recruiter recruiter2 = Recruiter.named("George");
    Recruiter recruiter3 = Recruiter.named("George");

    Assert.assertNotEquals(recruiter1, recruiter2);
    Assert.assertNotEquals(recruiter1, recruiter3);
    Assert.assertNotEquals(recruiter2, recruiter3);
  }
Esempio n. 2
0
  @Test
  public void recruitersAreDisplayedByName() {
    Recruiter recruiter = Recruiter.named("George");
    RecruiterDisplayer recDisplayer = Mockito.mock(RecruiterDisplayer.class);
    recruiter.displayTo(recDisplayer);

    DisplayableName name = new Name("George");
    Mockito.verify(recDisplayer).displayRecruiter(name);
  }
Esempio n. 3
0
 @Test
 public void recruiterCanPostJob() {
   Recruiter recruiter = Recruiter.named("George");
   Job developerJob = ATSJob.titled("Developer");
   JobRepository jobRepository = Mockito.mock(JobRepository.class);
   recruiter.post(developerJob).to(jobRepository);
   JobPosting posting = new JobPosting(recruiter, developerJob);
   Mockito.verify(jobRepository).add(posting);
 }
Esempio n. 4
0
 private void setupActors() {
   developerJob = ATSJob.titled("Developer");
   architectJob = ATSJob.titled("Architect");
   programmerJob = JReqJob.titled("Programmer");
   jobseekerTom = Jobseeker.named("Tom");
   jobseekerDick = Jobseeker.named("Dick");
   jobseekerHarry = Jobseeker.named("Harry");
   recruiter = Recruiter.named("George");
 }