use of gov.ca.cwds.cals.service.dto.packet.PacketDTO in project cals-api by ca-cwds.
the class RFAPacketResourceTest method testPacketApi.
@Test
public void testPacketApi() throws Exception {
RFA1aFormDTO form = formAHelper.createRFA1aForm();
ApplicantDTO applicantDTO = applicantHelper.postApplicant(form.getId(), applicantHelper.getValidApplicant());
ApplicantDTO secondApplicant = applicantHelper.getValidApplicant();
secondApplicant.setFirstName("John");
StateType driverLicenseState = new StateType();
driverLicenseState.setId("MD");
driverLicenseState.setValue("Maryland");
secondApplicant.setDriverLicenseState(driverLicenseState);
secondApplicant.getEthnicity().setId(2L);
secondApplicant.getEthnicity().setValue("American Indian");
secondApplicant = applicantHelper.postApplicant(form.getId(), secondApplicant);
residenceHelper.putResidence(form.getId(), residenceHelper.getResidenceDTO());
RFA1bFormDTO rfa1bForm = formBHelper.getRfa1bForm();
formBHelper.postRfa1bForm(form.getId(), applicantDTO.getId(), rfa1bForm);
otherAdultHelper.createOtherAdults(form.getId(), secondApplicant);
minorChildHelper.createMinorChildren(form.getId(), applicantDTO);
WebTarget target = clientTestRule.target(API.RFA_PACKET + "/" + form.getId() + "/" + SUMMARY);
Invocation.Builder invocation = target.request(MediaType.APPLICATION_JSON);
PacketDTO packetDTO = invocation.get(PacketDTO.class);
assertNotNull(packetDTO);
}
Aggregations