@Test @Rollback(false) public void testSaveApplicant() throws Exception { User applicant7 = new User(); applicant7.setFirstName("Stanley"); applicant7.setLastName("Churn"); applicant7.setEmailAddress("*****@*****.**"); Set<Resume> resumes = new HashSet<Resume>(); applicant7.setResumes(resumes); Resume resume9 = new Resume(); resume9.setApplicant(applicant7); resume9.setSummary("A Perl PHP developer with 10 years web development experience"); resume9.setLastUpdated(new GregorianCalendar(2008, 1, 6).getTime()); InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("resume9.doc"); byte[] content = new byte[30720]; is.read(content); is.close(); resume9.setContent(content); resumes.add(resume9); resumeManager.saveApplicant(applicant7); }
@Test @Rollback(false) public void testSeFindResumesWithDocHandler() throws Exception { List<Resume> resumes = resumeManager.seFindResumesWithDocHandler( new GregorianCalendar(2006, 1, 1).getTime(), new GregorianCalendar().getTime(), "perl", "web"); assertTrue(resumes.size() == 1); for (Resume resume : resumes) { log.debug("testSeFindResumesWithDocHandler - " + resume.getSummary()); } }