use of gov.ca.cwds.data.persistence.cms.CountyTriggerEmbeddable in project API by ca-cwds.
the class CountyTriggerDaoIT method testDelete.
@Override
@Test
public void testDelete() throws Exception {
String timestamp = "2017-05-23 19:53:50.505";
CountyTriggerEmbeddable countyTriggerEmbeddable = new CountyTriggerEmbeddable(countyOwnershipT, null);
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
Date date = formatter.parse(timestamp);
countyTriggerEmbeddable.setIntegratorTimeStamp(date);
CountyTrigger deleted = countyTriggerDao.delete(countyTriggerEmbeddable);
assertThat(deleted.getCountyTriggerEmbeddable().getCountyOwnershipT(), is(countyOwnershipT));
}
use of gov.ca.cwds.data.persistence.cms.CountyTriggerEmbeddable in project API by ca-cwds.
the class CountyTriggerDaoIT method testFind.
@Override
@Test
public void testFind() throws Exception {
String timestamp = "2017-05-23 19:53:50.505";
CountyTriggerEmbeddable countyTriggerEmbeddable = new CountyTriggerEmbeddable(countyOwnershipT, null);
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
Date date = formatter.parse(timestamp);
countyTriggerEmbeddable.setIntegratorTimeStamp(date);
CountyTrigger found = countyTriggerDao.find(countyTriggerEmbeddable);
assertThat(found.getCountyTriggerEmbeddable().getCountyOwnershipT(), is(equalTo(countyOwnershipT)));
}
use of gov.ca.cwds.data.persistence.cms.CountyTriggerEmbeddable in project API by ca-cwds.
the class CountyTriggerDaoIT method testDeleteEntityNotFoundException.
@Override
@Test
public void testDeleteEntityNotFoundException() throws Exception {
CountyTriggerEmbeddable countyTriggerEmbeddable = new CountyTriggerEmbeddable("ABC1234568", null);
CountyTrigger deleted = countyTriggerDao.delete(countyTriggerEmbeddable);
assertThat(deleted, is(nullValue()));
}
use of gov.ca.cwds.data.persistence.cms.CountyTriggerEmbeddable in project API by ca-cwds.
the class CountyTriggerDaoIT method testUpdate.
@Override
@Test
public void testUpdate() throws Exception {
String timestamp = "2017-05-23 19:53:50.505";
CountyTriggerEmbeddable countyTriggerEmbeddable = new CountyTriggerEmbeddable(countyOwnershipT, null);
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
Date date = formatter.parse(timestamp);
CountyTrigger countyTrigger = new CountyTrigger(countyOwnershipT, "61", "C", null, "REFR_CLT");
countyTrigger.getPrimaryKey().setIntegratorTimeStamp(date);
CountyTrigger updated = countyTriggerDao.update(countyTrigger);
assertThat(updated, is(countyTrigger));
}
use of gov.ca.cwds.data.persistence.cms.CountyTriggerEmbeddable in project API by ca-cwds.
the class CountyTriggerDaoIT method testFindEntityNotFoundException.
@Override
@Test
public void testFindEntityNotFoundException() throws Exception {
CountyTriggerEmbeddable countyTriggerEmbeddable = new CountyTriggerEmbeddable("9999999KKK", null);
CountyTrigger found = countyTriggerDao.find(countyTriggerEmbeddable);
assertThat(found, is(nullValue()));
}
Aggregations