use of gov.ca.cwds.rest.api.Response in project API by ca-cwds.
the class LongTextServiceTest method testDeleteReturnsNullWhenNotFound.
@Override
@Test
public void testDeleteReturnsNullWhenNotFound() throws Exception {
Response found = longTextService.delete("ABC1234567");
assertThat(found, is(nullValue()));
}
use of gov.ca.cwds.rest.api.Response in project API by ca-cwds.
the class ClientServiceTest method testFindReturnsNullWhenNotFound.
@Override
@Test
public void testFindReturnsNullWhenNotFound() throws Exception {
Response found = clientService.find("ABC1234567");
assertThat(found, is(nullValue()));
}
use of gov.ca.cwds.rest.api.Response in project API by ca-cwds.
the class CrossReportServiceTest method deleteReturnsNullWhenNotFount.
@SuppressWarnings("javadoc")
@Test
public void deleteReturnsNullWhenNotFount() throws Exception {
Response found = crossReportService.delete("ABC1234567");
assertThat(found, is(nullValue()));
}
use of gov.ca.cwds.rest.api.Response in project API by ca-cwds.
the class ReferralClientServiceTest method createReturnsPostedReferralClient.
@SuppressWarnings("javadoc")
@Test
public void createReturnsPostedReferralClient() throws Exception {
ReferralClient referralClientDomain = MAPPER.readValue(fixture("fixtures/domain/legacy/ReferralClient/valid/valid.json"), ReferralClient.class);
gov.ca.cwds.data.persistence.cms.ReferralClient toCreate = new gov.ca.cwds.data.persistence.cms.ReferralClient(referralClientDomain, "ABC");
ReferralClient request = new ReferralClient(toCreate);
when(referralClientDao.create(any(gov.ca.cwds.data.persistence.cms.ReferralClient.class))).thenReturn(toCreate);
Response response = referralClientService.create(request);
assertThat(response.getClass(), is(ReferralClient.class));
}
use of gov.ca.cwds.rest.api.Response in project API by ca-cwds.
the class ReferralClientServiceTest method createReturnsPostedReferralClientClass.
@SuppressWarnings("javadoc")
@Test
public void createReturnsPostedReferralClientClass() throws Exception {
ReferralClient referralClientDomain = MAPPER.readValue(fixture("fixtures/domain/legacy/ReferralClient/valid/valid.json"), ReferralClient.class);
gov.ca.cwds.data.persistence.cms.ReferralClient toCreate = new gov.ca.cwds.data.persistence.cms.ReferralClient(referralClientDomain, "ABC");
ReferralClient request = new ReferralClient(toCreate);
when(referralClientDao.create(any(gov.ca.cwds.data.persistence.cms.ReferralClient.class))).thenReturn(toCreate);
Response response = referralClientService.create(request);
assertThat(response.getClass(), is(ReferralClient.class));
}
Aggregations