use of gov.ca.cwds.data.persistence.cms.Reporter in project API by ca-cwds.
the class ReporterDaoIT method testFindEntityNotFoundException.
@Override
@Test
public void testFindEntityNotFoundException() throws Exception {
String id = "ZZZZZZZ999";
Reporter found = reporterDao.find(id);
assertThat(found, is(nullValue()));
}
use of gov.ca.cwds.data.persistence.cms.Reporter in project API by ca-cwds.
the class ReporterDaoIT method testUpdateEntityNotFoundException.
@Override
@Test
public void testUpdateEntityNotFoundException() throws Exception {
thrown.expect(EntityNotFoundException.class);
Reporter reporter = new Reporter("ZZZZZZ", " ", "City", (short) 591, (short) 0, "N", null, " ", null, "N", "Fred", "Reporter", "N", 0, BigDecimal.valueOf(0), " ", " ", BigDecimal.valueOf(0L), 0, (short) 1828, "Street", "12345", " ", new Integer(95845), "AbiQCgu0Hk", (short) 0, "51");
reporterDao.update(reporter);
}
use of gov.ca.cwds.data.persistence.cms.Reporter in project API by ca-cwds.
the class ReporterDaoIT method testCreate.
@Override
@Test
public void testCreate() throws Exception {
Reporter reporter = new Reporter("AbiQCgu0AA", " ", "City", (short) 591, (short) 0, "N", null, " ", null, "N", "Fred", "Reporter", "N", 0, BigDecimal.valueOf(0), " ", " ", BigDecimal.valueOf(0L), 0, (short) 1828, "Street", "12345", " ", new Integer(95845), "AbiQCgu0Hk", (short) 0, "51");
Reporter created = reporterDao.create(reporter);
assertThat(created, is(reporter));
}
use of gov.ca.cwds.data.persistence.cms.Reporter in project API by ca-cwds.
the class ReporterDaoIT method testFind.
@Override
@Test
public void testFind() throws Exception {
String id = "AbiQCgu0Hj";
Reporter found = reporterDao.find(id);
assertThat(found.getReferralId(), is(id));
}
use of gov.ca.cwds.data.persistence.cms.Reporter in project API by ca-cwds.
the class ReporterDaoIT method testCreateExistingEntityException.
@Override
@Test
public void testCreateExistingEntityException() throws Exception {
thrown.expect(EntityExistsException.class);
Reporter reporter = new Reporter("AbiQCgu0Hj", " ", "City", (short) 591, (short) 0, "N", null, " ", null, "N", "Fred", "Reporter", "N", 0, BigDecimal.valueOf(0), " ", " ", BigDecimal.valueOf(0L), 0, (short) 1828, "Street", "12345", " ", new Integer(95845), "AbiQCgu0Hk", (short) 0, "51");
reporterDao.create(reporter);
}
Aggregations