use of gov.ca.cwds.cals.service.dto.rfa.ApplicantDTO in project cals-api by ca-cwds.
the class Rfa1aFormGenerationTest method getApplicant.
private ApplicantDTO getApplicant(Long id, int seed) throws Exception {
ApplicantDTO applicant = mapper.readValue(APPLICANT_FIXTURE, ApplicantDTO.class);
applicant.setId(id);
applicant.setFirstName(applicant.getFirstName() + seed);
applicant.setLastName(applicant.getLastName() + seed);
return applicant;
}
use of gov.ca.cwds.cals.service.dto.rfa.ApplicantDTO in project cals-api by ca-cwds.
the class ApplicantUtilsTest method testEmploymentNull.
@Test
public void testEmploymentNull() {
ApplicantDTO applicantDTO = new ApplicantDTO();
applicantDTO.setEmployment(null);
assertEquals(new BigDecimal(0), Utils.Applicant.getAnnualIncome(applicantDTO));
}
use of gov.ca.cwds.cals.service.dto.rfa.ApplicantDTO in project cals-api by ca-cwds.
the class ApplicantUtilsTest method testIncomeNull.
@Test
public void testIncomeNull() {
ApplicantDTO applicantDTO = new ApplicantDTO();
EmploymentDTO employmentDTO = new EmploymentDTO();
employmentDTO.setIncome(null);
applicantDTO.setEmployment(employmentDTO);
assertEquals(new BigDecimal(0), Utils.Applicant.getAnnualIncome(applicantDTO));
}
use of gov.ca.cwds.cals.service.dto.rfa.ApplicantDTO in project cals-api by ca-cwds.
the class ApplicantUtilsTest method testIncomeTypeNull.
@Test
public void testIncomeTypeNull() {
ApplicantDTO applicantDTO = new ApplicantDTO();
EmploymentDTO employmentDTO = new EmploymentDTO();
employmentDTO.setIncome(new BigDecimal(100));
employmentDTO.setIncomeType(null);
applicantDTO.setEmployment(employmentDTO);
assertEquals(new BigDecimal(100), Utils.Applicant.getAnnualIncome(applicantDTO));
}
use of gov.ca.cwds.cals.service.dto.rfa.ApplicantDTO in project cals-api by ca-cwds.
the class ApplicantNamesDuplicationConstraintPutConfiguration method getValidatedFact.
@Override
public RFA1aForm getValidatedFact(Object[] input) {
BusinessValidationParameterObject<ApplicantDTO> parameterObject = getBusinessValidationParameterObject(input);
RFA1aForm form = getFormDao().find(parameterObject.getFormId());
return buildModifiedForm(form, parameterObject.getEntityDTO());
}
Aggregations