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

    Contact contact = new Contact(mail);
    contactRepository.create(contact);
    contactRepository.delete(contact);
  }
コード例 #2
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);
  }