Пример #1
0
  @Test
  public void testDeleteWithApplicantRepositoryShouldNotFindApplicantThatDelete() throws Exception {
    Applicant delete = applicantRepository.find(applicant.getId());
    applicantRepository.delete(delete);

    Applicant result = applicantRepository.find(delete.getId());
    assertNull(result);
  }
Пример #2
0
  @Test
  public void testUpdateWithApplicantRepositoryShouldReturnApplicantThatUpdated() throws Exception {
    Applicant update = applicantRepository.find(applicant.getId());
    update.setFirstNameEN("AnatUpdate");
    applicantRepository.update(update);

    Applicant result = applicantRepository.find(update.getId());
    assertNotNull(result);
    assertThat(result.getId(), is(update.getId()));
    assertThat(result.getFirstNameEN(), is("AnatUpdate"));
  }
Пример #3
0
 @Test
 public void testFindApplicantByIdWithApplicantRepositoryShouldReturnSetupApplicant()
     throws Exception {
   ApplicantDto result = applicantRepository.findApplicantById(applicant.getId());
   assertNotNull(result);
   assertThat(result.getFirstNameEN(), is("Anat"));
 }
Пример #4
0
 @Test
 public void testGetMaxApplicantIdWithApplicantRepositoryShouldReturnSetupId() throws Exception {
   ApplicantDto result = applicantRepository.getMaxApplicantId();
   assertThat(result.getId(), is(applicant.getId()));
 }