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"); }
@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); }