Search in sources :

Example 11 with Referral

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

the class ReferralDaoIT method testFindEntityNotFoundException.

@Override
@Test
public void testFindEntityNotFoundException() throws Exception {
    String id = "ZZZZZZ999";
    Referral found = referralDao.find(id);
    assertThat(found, is(nullValue()));
}
Also used : Referral(gov.ca.cwds.data.persistence.cms.Referral) Test(org.junit.Test)

Example 12 with Referral

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

the class ReferralDaoIT method testCreate.

@Override
@Test
public void testCreate() throws Exception {
    Referral referral = new Referral("AbiQCgu0Ht", " ", "N", "N", "D5YRVOm0Ht", (short) 122, " ", (Date) null, (short) 409, "", "", "L3H7sSC0Ht", "", "N", "N", (short) 1118, " ", "N", "N", (Date) null, "Verification (R3)", " ", (Date) null, (Date) null, (short) 1520, (short) 0, (Date) null, (Date) null, "", "", " ", " ", " ", "", "", "0Ht", "0Ht", "51", "N", "N", "N", "N", (Date) null, "C", (short) 0, (Date) null, "", (Date) null, null, null, null, null);
    Referral created = referralDao.create(referral);
    assertThat(created, is(referral));
}
Also used : Referral(gov.ca.cwds.data.persistence.cms.Referral) Test(org.junit.Test)

Example 13 with Referral

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

the class ReferralDaoIT method testDeleteEntityNotFoundException.

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

Aggregations

Referral (gov.ca.cwds.data.persistence.cms.Referral)13 Test (org.junit.Test)10 CountyTrigger (gov.ca.cwds.data.persistence.cms.CountyTrigger)3 StaffPerson (gov.ca.cwds.data.persistence.cms.StaffPerson)2 PostedReferral (gov.ca.cwds.rest.api.domain.cms.PostedReferral)2 ServiceException (gov.ca.cwds.rest.services.ServiceException)2 InvocationOnMock (org.mockito.invocation.InvocationOnMock)2 ReferralClient (gov.ca.cwds.data.persistence.cms.ReferralClient)1 EntityExistsException (javax.persistence.EntityExistsException)1 EntityNotFoundException (javax.persistence.EntityNotFoundException)1