コード例 #1
0
ファイル: RecruiterTest.java プロジェクト: jbandyo/OC2
  @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);
  }
コード例 #2
0
ファイル: RecruiterTest.java プロジェクト: jbandyo/OC2
  @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);
  }
コード例 #3
0
ファイル: RecruiterTest.java プロジェクト: jbandyo/OC2
 @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);
 }
コード例 #4
0
ファイル: RecruiterTest.java プロジェクト: jbandyo/OC2
 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");
 }