use of gov.ca.cwds.data.persistence.cms.AllegationPerpetratorHistory in project API by ca-cwds.
the class AllegationPerpetratorHistoryDaoIT method testUpdate.
@Override
@Test
public void testUpdate() throws Exception {
gov.ca.cwds.rest.api.domain.cms.AllegationPerpetratorHistory vdaph = validDomainAllegationPerpetratorHistory();
AllegationPerpetratorHistory allegationPerpetratorHistory = new AllegationPerpetratorHistory(id, vdaph.getCountySpecificCode(), vdaph.getVictimClientId(), vdaph.getAllegationId(), DomainChef.uncookDateString(vdaph.getPerpetratorUpdateDate()));
AllegationPerpetratorHistory updated = allegationPerpetratorHistoryDao.update(allegationPerpetratorHistory);
assertThat(allegationPerpetratorHistory, is(updated));
}
use of gov.ca.cwds.data.persistence.cms.AllegationPerpetratorHistory in project API by ca-cwds.
the class AllegationPerpetratorHistoryDaoIT method testUpdateEntityNotFoundException.
@Override
@Test
public void testUpdateEntityNotFoundException() throws Exception {
thrown.expect(EntityNotFoundException.class);
gov.ca.cwds.rest.api.domain.cms.AllegationPerpetratorHistory vdaph = validDomainAllegationPerpetratorHistory();
AllegationPerpetratorHistory allegationPerpetratorHistory = new AllegationPerpetratorHistory("1234567ABC", vdaph.getCountySpecificCode(), vdaph.getVictimClientId(), vdaph.getAllegationId(), DomainChef.uncookDateString(vdaph.getPerpetratorUpdateDate()));
allegationPerpetratorHistoryDao.update(allegationPerpetratorHistory);
}
use of gov.ca.cwds.data.persistence.cms.AllegationPerpetratorHistory in project API by ca-cwds.
the class AllegationPerpetratorHistoryDaoIT method testDeleteEntityNotFoundException.
@Override
@Test
public void testDeleteEntityNotFoundException() throws Exception {
AllegationPerpetratorHistory deleted = allegationPerpetratorHistoryDao.delete("9999999ZZZ");
assertThat(deleted, is(nullValue()));
}
use of gov.ca.cwds.data.persistence.cms.AllegationPerpetratorHistory in project API by ca-cwds.
the class AllegationPerpetratorHistoryDaoIT method testCreateExistingEntityException.
@Override
@Test
public void testCreateExistingEntityException() throws Exception {
thrown.expect(EntityExistsException.class);
gov.ca.cwds.rest.api.domain.cms.AllegationPerpetratorHistory vdaph = validDomainAllegationPerpetratorHistory();
AllegationPerpetratorHistory allegationPerpetratorHistory = new AllegationPerpetratorHistory(id, vdaph.getCountySpecificCode(), vdaph.getVictimClientId(), vdaph.getAllegationId(), DomainChef.uncookDateString(vdaph.getPerpetratorUpdateDate()));
allegationPerpetratorHistoryDao.create(allegationPerpetratorHistory);
}
use of gov.ca.cwds.data.persistence.cms.AllegationPerpetratorHistory in project API by ca-cwds.
the class AllegationPerpetratorHistoryDaoIT method testFind.
/**
* Find JUnit test
*/
@Override
@Test
public void testFind() throws Exception {
AllegationPerpetratorHistory found = allegationPerpetratorHistoryDao.find(id);
assertThat(found.getId(), is(equalTo(id)));
}
Aggregations