@Test public void shouldMapApeType() throws Exception { Implementation implementation = getImplementationForExecutor(PRODUCT_6x1_CODE, APE_EXECUTOR); ImplementationReportViewModel viewModel = mapper.mapApeImplementations(newArrayList(implementation), malariaProgram.getStatus()); assertThat(viewModel.getType(), is(ImplementationReportType.APE)); }
public ImplementationReportViewModel mapApeImplementations(Collection<Implementation> implementations, ViaReportStatus status) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Implementation implementation = findImplementationForExecutor(implementations, APE.name()); ImplementationReportViewModel report = new ImplementationReportViewModel(); report.setType(ImplementationReportType.APE); report.setStatus(status); if (implementation != null) { for (String product : products) { mapForProduct(implementation, product, report); } } return report; }
ImplementationListToImplementationReportViewModelMapper { public ImplementationReportViewModel mapApeImplementations(Collection<Implementation> implementations, ViaReportStatus status) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Implementation implementation = findImplementationForExecutor(implementations, APE.name()); ImplementationReportViewModel report = new ImplementationReportViewModel(); report.setType(ImplementationReportType.APE); report.setStatus(status); if (implementation != null) { for (String product : products) { mapForProduct(implementation, product, report); } } return report; } }
ImplementationListToImplementationReportViewModelMapper { public ImplementationReportViewModel mapApeImplementations(Collection<Implementation> implementations, ViaReportStatus status) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Implementation implementation = findImplementationForExecutor(implementations, APE.name()); ImplementationReportViewModel report = new ImplementationReportViewModel(); report.setType(ImplementationReportType.APE); report.setStatus(status); if (implementation != null) { for (String product : products) { mapForProduct(implementation, product, report); } } return report; }  }
ImplementationListToImplementationReportViewModelMapper { public ImplementationReportViewModel mapApeImplementations(Collection<Implementation> implementations, ViaReportStatus status) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Implementation implementation = findImplementationForExecutor(implementations, APE.name()); ImplementationReportViewModel report = new ImplementationReportViewModel(); report.setType(ImplementationReportType.APE); report.setStatus(status); if (implementation != null) { for (String product : products) { mapForProduct(implementation, product, report); } } return report; }  ImplementationReportViewModel mapApeImplementations(Collection<Implementation> implementations, ViaReportStatus status); ImplementationReportViewModel mapUsImplementations(Collection<Implementation> implementations, ViaReportStatus status); }
ImplementationListToImplementationReportViewModelMapper { public ImplementationReportViewModel mapApeImplementations(Collection<Implementation> implementations, ViaReportStatus status) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Implementation implementation = findImplementationForExecutor(implementations, APE.name()); ImplementationReportViewModel report = new ImplementationReportViewModel(); report.setType(ImplementationReportType.APE); report.setStatus(status); if (implementation != null) { for (String product : products) { mapForProduct(implementation, product, report); } } return report; }  ImplementationReportViewModel mapApeImplementations(Collection<Implementation> implementations, ViaReportStatus status); ImplementationReportViewModel mapUsImplementations(Collection<Implementation> implementations, ViaReportStatus status);  }