Search in sources :

Example 1 with PrimaryKey

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

the class ReferralClientDaoIT method testFindEntityNotFoundException.

@Override
@Test
public void testFindEntityNotFoundException() throws Exception {
    ReferralClient found = referralClientDao.find(new PrimaryKey("ZZZZZZZ999", "XXXXXXX000"));
    assertThat(found, is(nullValue()));
}
Also used : PrimaryKey(gov.ca.cwds.data.persistence.cms.ReferralClient.PrimaryKey) ReferralClient(gov.ca.cwds.data.persistence.cms.ReferralClient) Test(org.junit.Test)

Example 2 with PrimaryKey

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

the class ReferralClientDaoIT method testDelete.

@Override
@Test
public void testDelete() throws Exception {
    ReferralClient delete = referralClientDao.delete(new PrimaryKey("LNuzMKw06s", "AazXkWY06s"));
    assertThat(delete.getClientId(), is("AazXkWY06s"));
    assertThat(delete.getReferralId(), is("LNuzMKw06s"));
}
Also used : PrimaryKey(gov.ca.cwds.data.persistence.cms.ReferralClient.PrimaryKey) ReferralClient(gov.ca.cwds.data.persistence.cms.ReferralClient) Test(org.junit.Test)

Example 3 with PrimaryKey

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

the class ReferralClientDaoIT method testDeleteEntityNotFoundException.

@Override
@Test
public void testDeleteEntityNotFoundException() throws Exception {
    ReferralClient delete = referralClientDao.delete(new PrimaryKey("ZZZZZZZ999", "XXXXXXX000"));
    assertThat(delete, is(nullValue()));
}
Also used : PrimaryKey(gov.ca.cwds.data.persistence.cms.ReferralClient.PrimaryKey) ReferralClient(gov.ca.cwds.data.persistence.cms.ReferralClient) Test(org.junit.Test)

Example 4 with PrimaryKey

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

the class ReferralClientDaoIT method testFind.

@Override
@Test
public void testFind() throws Exception {
    ReferralClient found = referralClientDao.find(new PrimaryKey("LNuzMKw06s", "AazXkWY06s"));
    assertThat(found, is(notNullValue()));
    assertThat(found.getReferralId(), is(equalTo("LNuzMKw06s")));
    assertThat(found.getClientId(), is(equalTo("AazXkWY06s")));
}
Also used : PrimaryKey(gov.ca.cwds.data.persistence.cms.ReferralClient.PrimaryKey) ReferralClient(gov.ca.cwds.data.persistence.cms.ReferralClient) Test(org.junit.Test)

Aggregations

ReferralClient (gov.ca.cwds.data.persistence.cms.ReferralClient)4 PrimaryKey (gov.ca.cwds.data.persistence.cms.ReferralClient.PrimaryKey)4 Test (org.junit.Test)4