@Test public void shouldDelegateDeployToEntryDeployers() { ApplicationContent firstApp = mock(ApplicationContent.class); ApplicationContent secondApp = mock(ApplicationContent.class); given(applicationLoader.loadApplications()).willReturn(Arrays.asList(firstApp, secondApp)); deployer.deploy(); verify(firstDeployer).deployEntries(firstApp); verify(firstDeployer).deployEntries(secondApp); verify(secondDeployer).deployEntries(firstApp); verify(secondDeployer).deployEntries(secondApp); }
public void deploy() { List<ApplicationContent> applications = applicationLoader.loadApplications(); for (ApplicationContent application : applications) { for (ApplicationEntryDeployer deployer : deployers) { deployer.deployEntries(application); } } }
ApplicationDeployer { public void deploy() { List<ApplicationContent> applications = applicationLoader.loadApplications(); for (ApplicationContent application : applications) { for (ApplicationEntryDeployer deployer : deployers) { deployer.deployEntries(application); } } } }
ApplicationDeployer { public void deploy() { List<ApplicationContent> applications = applicationLoader.loadApplications(); for (ApplicationContent application : applications) { for (ApplicationEntryDeployer deployer : deployers) { deployer.deployEntries(application); } } } ApplicationDeployer(ApplicationService applicationLoader,
                               List<ApplicationEntryDeployer> deployers); }
ApplicationDeployer { public void deploy() { List<ApplicationContent> applications = applicationLoader.loadApplications(); for (ApplicationContent application : applications) { for (ApplicationEntryDeployer deployer : deployers) { deployer.deployEntries(application); } } } ApplicationDeployer(ApplicationService applicationLoader,
                               List<ApplicationEntryDeployer> deployers); void deploy(); }
ApplicationDeployer { public void deploy() { List<ApplicationContent> applications = applicationLoader.loadApplications(); for (ApplicationContent application : applications) { for (ApplicationEntryDeployer deployer : deployers) { deployer.deployEntries(application); } } } ApplicationDeployer(ApplicationService applicationLoader,
                               List<ApplicationEntryDeployer> deployers); void deploy();  }