Search in sources :

Example 1 with TypedPersonNameDTO

use of gov.ca.cwds.cals.service.dto.rfa.TypedPersonNameDTO in project cals-api by ca-cwds.

the class RFA1aRequiredFieldsValidationTest method prepareEmptyForm.

private RFA1aFormDTO prepareEmptyForm() throws Exception {
    RFA1aFormDTO form = formAHelper.createRFA1aForm();
    ApplicantDTO applicant = applicantHelper.getValidApplicant();
    applicant.setOtherNames(Collections.singletonList(new TypedPersonNameDTO()));
    applicant.setDateOfBirth(null);
    applicant.setDriverLicenseNumber("11111111");
    applicant.setDriverLicenseState(null);
    PhoneDTO phoneDTO = new PhoneDTO();
    PhoneNumberType phoneNumberType = new PhoneNumberType();
    phoneNumberType.setId(1L);
    phoneNumberType.setValue("Cell");
    phoneDTO.setPhoneType(phoneNumberType);
    PhoneDTO secondaryPhoneDTO = new PhoneDTO();
    secondaryPhoneDTO.setPhoneType(phoneNumberType);
    applicant.setPhones(Arrays.asList(phoneDTO, secondaryPhoneDTO));
    applicantHelper.postApplicant(form.getId(), applicant);
    ResidenceDTO residenceDTO = residenceHelper.getResidenceDTO();
    residenceDTO.setResidenceOwnership(null);
    residenceDTO.setBodyOfWaterExist(null);
    residenceDTO.setOthersUsingResidenceAsMailing(null);
    residenceDTO.setPhysicalMailingSimilar(null);
    residenceDTO.setWeaponInHome(null);
    residenceDTO.setHomeLanguages(null);
    // Create residential address
    RFAAddressDTO residentialAddress = new RFAAddressDTO();
    AddressType addressType = new AddressType();
    addressType.setId(1L);
    addressType.setValue("Residential");
    residentialAddress.setType(addressType);
    residenceDTO.setAddresses(Arrays.asList(// Resiadential address
    residentialAddress, // Empty Address object
    new RFAAddressDTO()));
    residenceHelper.putResidence(form.getId(), residenceDTO);
    return form;
}
Also used : RFAAddressDTO(gov.ca.cwds.cals.service.dto.rfa.RFAAddressDTO) RFA1aFormDTO(gov.ca.cwds.cals.service.dto.rfa.RFA1aFormDTO) TypedPersonNameDTO(gov.ca.cwds.cals.service.dto.rfa.TypedPersonNameDTO) ApplicantDTO(gov.ca.cwds.cals.service.dto.rfa.ApplicantDTO) ResidenceDTO(gov.ca.cwds.cals.service.dto.rfa.ResidenceDTO) PhoneDTO(gov.ca.cwds.cals.service.dto.rfa.PhoneDTO) AddressType(gov.ca.cwds.cals.persistence.model.calsns.dictionaries.AddressType) PhoneNumberType(gov.ca.cwds.cals.persistence.model.calsns.dictionaries.PhoneNumberType)

Aggregations

AddressType (gov.ca.cwds.cals.persistence.model.calsns.dictionaries.AddressType)1 PhoneNumberType (gov.ca.cwds.cals.persistence.model.calsns.dictionaries.PhoneNumberType)1 ApplicantDTO (gov.ca.cwds.cals.service.dto.rfa.ApplicantDTO)1 PhoneDTO (gov.ca.cwds.cals.service.dto.rfa.PhoneDTO)1 RFA1aFormDTO (gov.ca.cwds.cals.service.dto.rfa.RFA1aFormDTO)1 RFAAddressDTO (gov.ca.cwds.cals.service.dto.rfa.RFAAddressDTO)1 ResidenceDTO (gov.ca.cwds.cals.service.dto.rfa.ResidenceDTO)1 TypedPersonNameDTO (gov.ca.cwds.cals.service.dto.rfa.TypedPersonNameDTO)1