Search in sources :

Example 16 with StaffPerson

use of gov.ca.cwds.data.persistence.cms.StaffPerson in project API by ca-cwds.

the class StaffPersonDaoIT method testDeleteEntityNotFoundException.

@Override
@Test
public void testDeleteEntityNotFoundException() throws Exception {
    String id = "ZZZ";
    StaffPerson deleted = staffPersonDao.delete(id);
    assertThat(deleted, is(nullValue()));
}
Also used : StaffPerson(gov.ca.cwds.data.persistence.cms.StaffPerson) Test(org.junit.Test)

Example 17 with StaffPerson

use of gov.ca.cwds.data.persistence.cms.StaffPerson in project API by ca-cwds.

the class StaffPersonDaoIT method testDelete.

@Override
@Test
public void testDelete() throws Exception {
    String id = "q1p";
    StaffPerson deleted = staffPersonDao.delete(id);
    assertThat(deleted.getId(), is(id));
}
Also used : StaffPerson(gov.ca.cwds.data.persistence.cms.StaffPerson) Test(org.junit.Test)

Aggregations

StaffPerson (gov.ca.cwds.data.persistence.cms.StaffPerson)17 Test (org.junit.Test)10 ServiceException (gov.ca.cwds.rest.services.ServiceException)7 EntityExistsException (javax.persistence.EntityExistsException)4 PostedReferral (gov.ca.cwds.rest.api.domain.cms.PostedReferral)3 EntityNotFoundException (javax.persistence.EntityNotFoundException)3 ClientAddress (gov.ca.cwds.data.persistence.cms.ClientAddress)2 Referral (gov.ca.cwds.data.persistence.cms.Referral)2 ReferralClient (gov.ca.cwds.data.persistence.cms.ReferralClient)2 InvocationOnMock (org.mockito.invocation.InvocationOnMock)2 Client (gov.ca.cwds.data.persistence.cms.Client)1 PostedClient (gov.ca.cwds.rest.api.domain.cms.PostedClient)1 Referral (gov.ca.cwds.rest.api.domain.cms.Referral)1 ReferralClient (gov.ca.cwds.rest.api.domain.cms.ReferralClient)1