Search in sources :

Example 11 with Client

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

the class ClientDaoIT method testDeleteEntityNotFoundException.

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

Example 12 with Client

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

the class ClientDaoIT method testUpdate.

@Override
@Test
public void testUpdate() throws Exception {
    Client vc = validClient();
    Client pers = new Client(vc.getAdjudicatedDelinquentIndicator(), vc.getAdoptionStatusCode(), vc.getAlienRegistrationNumber(), vc.getBirthCity(), vc.getBirthCountryCodeType(), vc.getBirthDate(), vc.getBirthFacilityName(), vc.getBirthStateCodeType(), vc.getBirthplaceVerifiedIndicator(), vc.getChildClientIndicatorVar(), vc.getClientIndexNumber(), vc.getCommentDescription(), vc.getCommonFirstName(), vc.getCommonLastName(), vc.getCommonMiddleName(), vc.getConfidentialityActionDate(), vc.getConfidentialityInEffectIndicator(), vc.getCreationDate(), vc.getCurrCaChildrenServIndicator(), vc.getCurrentlyOtherDescription(), vc.getCurrentlyRegionalCenterIndicator(), vc.getDeathDate(), vc.getDeathDateVerifiedIndicator(), vc.getDeathPlace(), vc.getDeathReasonText(), vc.getDriverLicenseNumber(), vc.getDriverLicenseStateCodeType(), vc.getEmailAddress(), vc.getEstimatedDobCode(), vc.getEthUnableToDetReasonCode(), vc.getFatherParentalRightTermDate(), vc.getGenderCode(), vc.getHealthSummaryText(), vc.getHispUnableToDetReasonCode(), vc.getHispanicOriginCode(), "AaiU7IW0Rt", vc.getImmigrationCountryCodeType(), vc.getImmigrationStatusType(), vc.getIncapacitatedParentCode(), vc.getIndividualHealthCarePlanIndicator(), vc.getLimitationOnScpHealthIndicator(), vc.getLiterateCode(), vc.getMaritalCohabitatnHstryIndicatorVar(), vc.getMaritalStatusType(), vc.getMilitaryStatusCode(), vc.getMotherParentalRightTermDate(), vc.getNamePrefixDescription(), vc.getNameType(), vc.getOutstandingWarrantIndicator(), vc.getPrevCaChildrenServIndicator(), vc.getPrevOtherDescription(), vc.getPrevRegionalCenterIndicator(), vc.getPrimaryEthnicityType(), vc.getPrimaryLanguageType(), vc.getReligionType(), vc.getSecondaryLanguageType(), vc.getSensitiveHlthInfoOnFileIndicator(), vc.getSensitivityIndicator(), vc.getSoc158PlacementCode(), vc.getSoc158SealedClientIndicator(), vc.getSocialSecurityNumChangedCode(), vc.getSocialSecurityNumber(), vc.getSuffixTitleDescription(), vc.getTribalAncestryClientIndicatorVar(), vc.getTribalMembrshpVerifctnIndicatorVar(), vc.getUnemployedParentCode(), vc.getZippyCreatedIndicator(), null);
    Client updated = clientDao.update(pers);
    assertThat(updated, is(pers));
}
Also used : Client(gov.ca.cwds.data.persistence.cms.Client) Test(org.junit.Test)

Aggregations

Client (gov.ca.cwds.data.persistence.cms.Client)12 Test (org.junit.Test)9 PostedClient (gov.ca.cwds.rest.api.domain.cms.PostedClient)2 ServiceException (gov.ca.cwds.rest.services.ServiceException)2 CountyOwnership (gov.ca.cwds.data.persistence.cms.CountyOwnership)1 StaffPerson (gov.ca.cwds.data.persistence.cms.StaffPerson)1 ReferralClient (gov.ca.cwds.rest.api.domain.cms.ReferralClient)1 EntityExistsException (javax.persistence.EntityExistsException)1 EntityNotFoundException (javax.persistence.EntityNotFoundException)1 Query (org.hibernate.Query)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1