Esempio n. 1
0
  @Test
  public void findByEmailOrNull() {
    String email = TestUtils.uniqueEmail();

    Candidate candidate = new CandidateBuilder().withCompany(savedCompany).withEmail(email).build();

    candidate = candidateDao.save(candidate);

    Candidate found = candidateDao.findByEmailOrNull(email);

    assertEquals(found.getId(), candidate.getId());
  }
Esempio n. 2
0
 @Test
 public void findByEmailOrNull_failed() {
   Candidate result = candidateDao.findByEmailOrNull(TestUtils.uniqueEmail());
   assertNull(result);
 }