Search in sources :

Example 6 with CrossReport

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

the class CrossReportDaoIT method testFind.

@Override
@Test
public void testFind() throws Exception {
    CrossReport found = crossreportDao.find("7wviAIk0AB");
    assertThat(found.getThirdId(), is(equalTo("7wviAIk0AB")));
}
Also used : CrossReport(gov.ca.cwds.data.persistence.cms.CrossReport) Test(org.junit.Test)

Example 7 with CrossReport

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

the class CrossReportDaoIT method testDeleteEntityNotFoundException.

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

Example 8 with CrossReport

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

the class CrossReportDaoIT method testCreateExistingEntityException.

@Override
@Test
public void testCreateExistingEntityException() throws Exception {
    thrown.expect(EntityExistsException.class);
    CrossReport crossreport = new CrossReport("Aj20cK10WS", "CVDUfmj0WS", (short) 2094, "N", "N", null, "  ", 0, BigDecimal.ZERO, null, " ", " ", "925q4As0AC", "0AC", " ", " ", " ", "34", "N", "N", "N");
    crossreportDao.create(crossreport);
}
Also used : CrossReport(gov.ca.cwds.data.persistence.cms.CrossReport) Test(org.junit.Test)

Example 9 with CrossReport

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

the class CrossReportDaoIT method testFindEntityNotFoundException.

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

Example 10 with CrossReport

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

the class CrossReportDaoIT method testCreate.

@Override
@Test
public void testCreate() throws Exception {
    CrossReport crossreport = new CrossReport("925q4As0AC", "7wviAIk0AC", (short) 2094, "N", "N", null, "  ", 0, BigDecimal.ZERO, null, " ", " ", "925q4As0AC", "0AC", " ", " ", " ", "34", "N", "N", "N");
    CrossReport created = crossreportDao.create(crossreport);
    assertThat(created, is(crossreport));
}
Also used : CrossReport(gov.ca.cwds.data.persistence.cms.CrossReport) Test(org.junit.Test)

Aggregations

CrossReport (gov.ca.cwds.data.persistence.cms.CrossReport)10 Test (org.junit.Test)8 ServiceException (gov.ca.cwds.rest.services.ServiceException)2 EntityExistsException (javax.persistence.EntityExistsException)1 EntityNotFoundException (javax.persistence.EntityNotFoundException)1