@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); }
@Test public void testCreateContact() throws IllegalArgumentException, BusinessException { Contact contact = new Contact(mail); contactRepository.create(contact); contactRepository.delete(contact); }
@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()); }