use of gov.ca.cwds.cals.service.dto.rfa.EmploymentDTO 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.EmploymentDTO 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.EmploymentDTO in project cals-api by ca-cwds.
the class ApplicantUtilsTest method testIncomeTypeMonthly.
@Test
public void testIncomeTypeMonthly() {
ApplicantDTO applicantDTO = new ApplicantDTO();
EmploymentDTO employmentDTO = new EmploymentDTO();
employmentDTO.setIncome(new BigDecimal(100));
IncomeType annualIncomeType = new IncomeType();
annualIncomeType.setValue("monthly");
employmentDTO.setIncomeType(annualIncomeType);
applicantDTO.setEmployment(employmentDTO);
assertEquals(new BigDecimal(1200), Utils.Applicant.getAnnualIncome(applicantDTO));
}
use of gov.ca.cwds.cals.service.dto.rfa.EmploymentDTO in project cals-api by ca-cwds.
the class ApplicantUtilsTest method testIncomeTypeYearly.
@Test
public void testIncomeTypeYearly() {
ApplicantDTO applicantDTO = new ApplicantDTO();
EmploymentDTO employmentDTO = new EmploymentDTO();
employmentDTO.setIncome(new BigDecimal(100));
IncomeType annualIncomeType = new IncomeType();
annualIncomeType.setValue("yearly");
employmentDTO.setIncomeType(annualIncomeType);
applicantDTO.setEmployment(employmentDTO);
assertEquals(new BigDecimal(100), Utils.Applicant.getAnnualIncome(applicantDTO));
}
Aggregations