@Test public void shouldTransformDTOIntoObject() throws Exception { ChildCoverageLineItemDTO childCoverageLineItemDTO = new ChildCoverageLineItemDTO(); childCoverageLineItemDTO.setHealthCenter11Months(new Reading("123", false)); childCoverageLineItemDTO.setHealthCenter23Months(new Reading("12", false)); childCoverageLineItemDTO.setOutreach11Months(new Reading("10", false)); childCoverageLineItemDTO.setOutreach23Months(new Reading("20", false)); childCoverageLineItemDTO.setModifiedBy(2121L); childCoverageLineItemDTO.setId(11122L); ChildCoverageLineItem lineItem = childCoverageLineItemDTO.transform(); assertThat(lineItem.getHealthCenter11Months(), is(123)); assertThat(lineItem.getHealthCenter23Months(), is(12)); assertThat(lineItem.getOutreach11Months(), is(10)); assertThat(lineItem.getOutreach23Months(), is(20)); assertThat(lineItem.getModifiedBy(), is(2121L)); assertThat(lineItem.getId(), is(11122L)); }
public ChildCoverageLineItem transform() { ChildCoverageLineItem lineItem = new ChildCoverageLineItem(); lineItem.setHealthCenter11Months(healthCenter11Months.parsePositiveInt()); lineItem.setHealthCenter23Months(healthCenter23Months.parsePositiveInt()); lineItem.setOutreach11Months(outreach11Months.parsePositiveInt()); lineItem.setOutreach23Months(outreach23Months.parsePositiveInt()); lineItem.setId(this.id); lineItem.setModifiedBy(this.modifiedBy); return lineItem; }
ChildCoverageLineItemDTO extends BaseModel { public ChildCoverageLineItem transform() { ChildCoverageLineItem lineItem = new ChildCoverageLineItem(); lineItem.setHealthCenter11Months(healthCenter11Months.parsePositiveInt()); lineItem.setHealthCenter23Months(healthCenter23Months.parsePositiveInt()); lineItem.setOutreach11Months(outreach11Months.parsePositiveInt()); lineItem.setOutreach23Months(outreach23Months.parsePositiveInt()); lineItem.setId(this.id); lineItem.setModifiedBy(this.modifiedBy); return lineItem; } }
ChildCoverageLineItemDTO extends BaseModel { public ChildCoverageLineItem transform() { ChildCoverageLineItem lineItem = new ChildCoverageLineItem(); lineItem.setHealthCenter11Months(healthCenter11Months.parsePositiveInt()); lineItem.setHealthCenter23Months(healthCenter23Months.parsePositiveInt()); lineItem.setOutreach11Months(outreach11Months.parsePositiveInt()); lineItem.setOutreach23Months(outreach23Months.parsePositiveInt()); lineItem.setId(this.id); lineItem.setModifiedBy(this.modifiedBy); return lineItem; }  }
ChildCoverageLineItemDTO extends BaseModel { public ChildCoverageLineItem transform() { ChildCoverageLineItem lineItem = new ChildCoverageLineItem(); lineItem.setHealthCenter11Months(healthCenter11Months.parsePositiveInt()); lineItem.setHealthCenter23Months(healthCenter23Months.parsePositiveInt()); lineItem.setOutreach11Months(outreach11Months.parsePositiveInt()); lineItem.setOutreach23Months(outreach23Months.parsePositiveInt()); lineItem.setId(this.id); lineItem.setModifiedBy(this.modifiedBy); return lineItem; }  ChildCoverageLineItem transform(); }
ChildCoverageLineItemDTO extends BaseModel { public ChildCoverageLineItem transform() { ChildCoverageLineItem lineItem = new ChildCoverageLineItem(); lineItem.setHealthCenter11Months(healthCenter11Months.parsePositiveInt()); lineItem.setHealthCenter23Months(healthCenter23Months.parsePositiveInt()); lineItem.setOutreach11Months(outreach11Months.parsePositiveInt()); lineItem.setOutreach23Months(outreach23Months.parsePositiveInt()); lineItem.setId(this.id); lineItem.setModifiedBy(this.modifiedBy); return lineItem; }  ChildCoverageLineItem transform();  }