@Test public void shouldReturnDefaultViewModelWhenMalariaProgramIsNotDefined() throws Exception { malariaDataReportViewModel = mapper.Map(null); assertThat(malariaDataReportViewModel, is(notNullValue())); assertThat(malariaDataReportViewModel.getUsImplementationReportViewModel().getType(), is(ImplementationReportType.US)); assertThat(malariaDataReportViewModel.getApeImplementationReportViewModel().getType(), is(ImplementationReportType.APE)); }
public MalariaDataReportViewModel Map(MalariaProgram malariaProgram) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (malariaProgram == null) { return new MalariaDataReportViewModel(); } return new MalariaDataReportViewModel(malariaProgram.getReportedDate(), malariaProgram.getStartPeriodDate(), malariaProgram.getEndPeriodDate(), implementationReportMapper.mapUsImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus()), implementationReportMapper.mapApeImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus())); }
MalariaProgramToMalariaDataReportViewModelMapper { public MalariaDataReportViewModel Map(MalariaProgram malariaProgram) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (malariaProgram == null) { return new MalariaDataReportViewModel(); } return new MalariaDataReportViewModel(malariaProgram.getReportedDate(), malariaProgram.getStartPeriodDate(), malariaProgram.getEndPeriodDate(), implementationReportMapper.mapUsImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus()), implementationReportMapper.mapApeImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus())); } }
MalariaProgramToMalariaDataReportViewModelMapper { public MalariaDataReportViewModel Map(MalariaProgram malariaProgram) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (malariaProgram == null) { return new MalariaDataReportViewModel(); } return new MalariaDataReportViewModel(malariaProgram.getReportedDate(), malariaProgram.getStartPeriodDate(), malariaProgram.getEndPeriodDate(), implementationReportMapper.mapUsImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus()), implementationReportMapper.mapApeImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus())); }  }
MalariaProgramToMalariaDataReportViewModelMapper { public MalariaDataReportViewModel Map(MalariaProgram malariaProgram) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (malariaProgram == null) { return new MalariaDataReportViewModel(); } return new MalariaDataReportViewModel(malariaProgram.getReportedDate(), malariaProgram.getStartPeriodDate(), malariaProgram.getEndPeriodDate(), implementationReportMapper.mapUsImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus()), implementationReportMapper.mapApeImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus())); }  MalariaDataReportViewModel Map(MalariaProgram malariaProgram); }
MalariaProgramToMalariaDataReportViewModelMapper { public MalariaDataReportViewModel Map(MalariaProgram malariaProgram) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (malariaProgram == null) { return new MalariaDataReportViewModel(); } return new MalariaDataReportViewModel(malariaProgram.getReportedDate(), malariaProgram.getStartPeriodDate(), malariaProgram.getEndPeriodDate(), implementationReportMapper.mapUsImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus()), implementationReportMapper.mapApeImplementations(malariaProgram.getImplementations(), malariaProgram.getStatus())); }  MalariaDataReportViewModel Map(MalariaProgram malariaProgram);  }