@Test public void testDecorateWithCertificateTypeName() throws Exception { final ModuleEntryPoint moduleEntryPointOne = mock(ModuleEntryPoint.class); doReturn("TypeOneName").when(moduleEntryPointOne).getModuleName(); final ModuleEntryPoint moduleEntryPointTwo = mock(ModuleEntryPoint.class); doReturn("TypeTwoName").when(moduleEntryPointTwo).getModuleName(); doReturn(moduleEntryPointOne).when(intygModuleRegistry).getModuleEntryPoint("TypeOne"); doReturn(moduleEntryPointTwo).when(intygModuleRegistry).getModuleEntryPoint("TypeTwo"); final List<ListIntygEntry> listIntygEntries = getIntygEntryList(); intygDraftDecorator.decorateWithCertificateTypeName(listIntygEntries); assertEquals(3, listIntygEntries.size()); assertEquals("TypeOneName", listIntygEntries.get(0).getIntygTypeName()); assertEquals("TypeTwoName", listIntygEntries.get(1).getIntygTypeName()); assertEquals("TypeOneName", listIntygEntries.get(2).getIntygTypeName()); }
public void decorateWithCertificateTypeName(List<ListIntygEntry> listIntygEntries) { listIntygEntries.stream().forEach(listIntygEntry -> addCertificateTypeName(listIntygEntry)); }
IntygDraftDecorator { public void decorateWithCertificateTypeName(List<ListIntygEntry> listIntygEntries) { listIntygEntries.stream().forEach(listIntygEntry -> addCertificateTypeName(listIntygEntry)); } }
IntygDraftDecorator { public void decorateWithCertificateTypeName(List<ListIntygEntry> listIntygEntries) { listIntygEntries.stream().forEach(listIntygEntry -> addCertificateTypeName(listIntygEntry)); } @Autowired  IntygDraftDecorator(IntygModuleRegistry intygModuleRegistry); }
IntygDraftDecorator { public void decorateWithCertificateTypeName(List<ListIntygEntry> listIntygEntries) { listIntygEntries.stream().forEach(listIntygEntry -> addCertificateTypeName(listIntygEntry)); } @Autowired  IntygDraftDecorator(IntygModuleRegistry intygModuleRegistry); void decorateWithCertificateTypeName(List<ListIntygEntry> listIntygEntries); void decorateWithCertificateStatusName(List<ListIntygEntry> listIntygEntries); }
IntygDraftDecorator { public void decorateWithCertificateTypeName(List<ListIntygEntry> listIntygEntries) { listIntygEntries.stream().forEach(listIntygEntry -> addCertificateTypeName(listIntygEntry)); } @Autowired  IntygDraftDecorator(IntygModuleRegistry intygModuleRegistry); void decorateWithCertificateTypeName(List<ListIntygEntry> listIntygEntries); void decorateWithCertificateStatusName(List<ListIntygEntry> listIntygEntries);  }