コード例 #1
0
  @Test
  public void testCreateContactTwice() throws IllegalArgumentException, BusinessException {

    Contact contact = new Contact(mail);
    contactRepository.create(contact);
    try {
      contactRepository.create(contact);
      Assert.assertTrue(false);
    } catch (BusinessException e) {
      Assert.assertTrue(true);
    }

    contactRepository.delete(contact);
  }
コード例 #2
0
  @Test
  public void testCreateContact() throws IllegalArgumentException, BusinessException {

    Contact contact = new Contact(mail);
    contactRepository.create(contact);
    contactRepository.delete(contact);
  }
コード例 #3
0
  @Test
  public void testFindContact() throws IllegalArgumentException, BusinessException {

    Contact contact = new Contact(mail);
    contactRepository.create(contact);

    Contact c = contactRepository.findByMail(mail);
    logger.debug("mail id : " + c.getPersistenceId());
    Assert.assertNotNull(c.getPersistenceId());
  }