use of gov.ca.cwds.data.persistence.cms.Allegation in project API by ca-cwds.
the class AllegationDaoIT method testCreate.
/**
* Create JUnit test
*/
@Override
@Test
public void testCreate() throws Exception {
gov.ca.cwds.rest.api.domain.cms.Allegation vda = validDomainAllegation();
Allegation allegation = new Allegation("1234567ABC", DomainChef.uncookDateString(vda.getAbuseEndDate()), DomainChef.uncookDateString(vda.getAbuseStartDate()), vda.getAbuseFrequency(), vda.getAbuseFrequencyPeriodCode(), vda.getAbuseLocationDescription(), vda.getAllegationDispositionType(), vda.getAllegationType(), vda.getDispositionDescription(), DomainChef.uncookDateString(vda.getDispositionDate()), DomainChef.cookBoolean(vda.getInjuryHarmDetailIndicator()), vda.getNonProtectingParentCode(), DomainChef.cookBoolean(vda.getStaffPersonAddedIndicator()), vda.getVictimClientId(), vda.getPerpetratorClientId(), vda.getReferralId(), vda.getCountySpecificCode(), DomainChef.cookBoolean(vda.getZippyCreatedIndicator()), vda.getPlacementFacilityType(), null, null);
Allegation create = allegationDao.create(allegation);
assertThat(allegation, is(create));
}
use of gov.ca.cwds.data.persistence.cms.Allegation in project API by ca-cwds.
the class AllegationDaoIT method testFind.
/**
* Find JUnit test
*/
@Override
@Test
public void testFind() throws Exception {
Allegation found = allegationDao.find(id);
assertThat(found.getId(), is(equalTo(id)));
}
use of gov.ca.cwds.data.persistence.cms.Allegation in project API by ca-cwds.
the class AllegationDaoIT method testDelete.
/**
* Delete JUnit test
*/
@Override
@Test
public void testDelete() throws Exception {
Allegation deleted = allegationDao.delete(id);
assertThat(deleted.getId(), is(id));
}
use of gov.ca.cwds.data.persistence.cms.Allegation in project API by ca-cwds.
the class AllegationDaoIT method testUpdate.
@Override
@Test
public void testUpdate() throws Exception {
gov.ca.cwds.rest.api.domain.cms.Allegation vda = validDomainAllegation();
Allegation allegation = new Allegation(id, DomainChef.uncookDateString(vda.getAbuseEndDate()), DomainChef.uncookDateString(vda.getAbuseStartDate()), vda.getAbuseFrequency(), vda.getAbuseFrequencyPeriodCode(), vda.getAbuseLocationDescription(), vda.getAllegationDispositionType(), vda.getAllegationType(), vda.getDispositionDescription(), DomainChef.uncookDateString(vda.getDispositionDate()), DomainChef.cookBoolean(vda.getInjuryHarmDetailIndicator()), vda.getNonProtectingParentCode(), DomainChef.cookBoolean(vda.getStaffPersonAddedIndicator()), vda.getVictimClientId(), vda.getPerpetratorClientId(), vda.getReferralId(), vda.getCountySpecificCode(), DomainChef.cookBoolean(vda.getZippyCreatedIndicator()), vda.getPlacementFacilityType(), null, null);
Allegation updated = allegationDao.update(allegation);
assertThat(allegation, is(updated));
}
use of gov.ca.cwds.data.persistence.cms.Allegation in project API by ca-cwds.
the class AllegationDaoIT method testCreateExistingEntityException.
@Override
@Test
public void testCreateExistingEntityException() throws Exception {
thrown.expect(EntityExistsException.class);
gov.ca.cwds.rest.api.domain.cms.Allegation vda = validDomainAllegation();
Allegation allegation = new Allegation(id, DomainChef.uncookDateString(vda.getAbuseEndDate()), DomainChef.uncookDateString(vda.getAbuseStartDate()), vda.getAbuseFrequency(), vda.getAbuseFrequencyPeriodCode(), vda.getAbuseLocationDescription(), vda.getAllegationDispositionType(), vda.getAllegationType(), vda.getDispositionDescription(), DomainChef.uncookDateString(vda.getDispositionDate()), DomainChef.cookBoolean(vda.getInjuryHarmDetailIndicator()), vda.getNonProtectingParentCode(), DomainChef.cookBoolean(vda.getStaffPersonAddedIndicator()), vda.getVictimClientId(), vda.getPerpetratorClientId(), vda.getReferralId(), vda.getCountySpecificCode(), DomainChef.cookBoolean(vda.getZippyCreatedIndicator()), vda.getPlacementFacilityType(), null, null);
allegationDao.create(allegation);
}
Aggregations