@Test public void testInstall() { this.toskaLogic.install("Test App", "testConfig"); Map<String, String> args = new HashMap<>(); args.put("testKey", "testValue"); Mockito.verify(this.toscaClient).provisionApplication(ArgumentMatchers.eq(this.apps.get(0)), ArgumentMatchers.eq(args)); }
public void install(String appName, String configurationName) { List<Application> apps = getInstalledApps(); for (Application app : apps) { if (app.getDisplayName().equalsIgnoreCase(appName)) { install(app, configurationName); return; } } throw new NoSuchElementException("No app with this name is installed."); }
ToscaLogic { public void install(String appName, String configurationName) { List<Application> apps = getInstalledApps(); for (Application app : apps) { if (app.getDisplayName().equalsIgnoreCase(appName)) { install(app, configurationName); return; } } throw new NoSuchElementException("No app with this name is installed."); } }
ToscaLogic { public void install(String appName, String configurationName) { List<Application> apps = getInstalledApps(); for (Application app : apps) { if (app.getDisplayName().equalsIgnoreCase(appName)) { install(app, configurationName); return; } } throw new NoSuchElementException("No app with this name is installed."); }  }
ToscaLogic { public void install(String appName, String configurationName) { List<Application> apps = getInstalledApps(); for (Application app : apps) { if (app.getDisplayName().equalsIgnoreCase(appName)) { install(app, configurationName); return; } } throw new NoSuchElementException("No app with this name is installed."); }  List<ConfigurationEntry> getConfigurations(); void install(String appName, String configurationName); void install(Application app, String conigurationName); void install(Application app, Map<String, String> parameters); void waitForInstall(); List<Application> getInstalledApps(); }
ToscaLogic { public void install(String appName, String configurationName) { List<Application> apps = getInstalledApps(); for (Application app : apps) { if (app.getDisplayName().equalsIgnoreCase(appName)) { install(app, configurationName); return; } } throw new NoSuchElementException("No app with this name is installed."); }  List<ConfigurationEntry> getConfigurations(); void install(String appName, String configurationName); void install(Application app, String conigurationName); void install(Application app, Map<String, String> parameters); void waitForInstall(); List<Application> getInstalledApps();  }