use of gov.ca.cwds.cals.service.dto.rfa.PhoneDTO in project cals-api by ca-cwds.
the class PhoneDTOHelper method createPhone.
public static PhoneDTO createPhone(String number, String extension, boolean preferred, PhoneNumberType phoneType) {
PhoneDTO phone = new PhoneDTO();
phone.setNumber(number);
phone.setExtension(extension);
phone.setPreferred(false);
phone.setPhoneType(phoneType);
return phone;
}
use of gov.ca.cwds.cals.service.dto.rfa.PhoneDTO 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;
}
Aggregations