@Test public void testAddNewRuntime() { Provider provider = new Provider(mockProviderKey(mockProviderTypeKey(""), ""), mock(ProviderConfiguration.class)); @SuppressWarnings("unchecked") List<PipelineKey> pipelines = mock(List.class); when(runtimeService.getPipelines(provider.getKey().getProviderTypeKey())).thenReturn(pipelines); perspective.onAddNewRuntime(new AddNewRuntimeEvent(provider)); verify(newDeployWizard, times(1)).start(provider, pipelines); }
protected void onAddNewRuntime(@Observes final AddNewRuntimeEvent event) { if (event.getProvider() != null) { runtimeService.call((Collection<PipelineKey> result) -> { newDeployWizard.start(event.getProvider(), result); }).getPipelines(event.getProvider().getKey().getProviderTypeKey()); } }
ProvisioningManagementPerspective { protected void onAddNewRuntime(@Observes final AddNewRuntimeEvent event) { if (event.getProvider() != null) { runtimeService.call((Collection<PipelineKey> result) -> { newDeployWizard.start(event.getProvider(), result); }).getPipelines(event.getProvider().getKey().getProviderTypeKey()); } } }
ProvisioningManagementPerspective { protected void onAddNewRuntime(@Observes final AddNewRuntimeEvent event) { if (event.getProvider() != null) { runtimeService.call((Collection<PipelineKey> result) -> { newDeployWizard.start(event.getProvider(), result); }).getPipelines(event.getProvider().getKey().getProviderTypeKey()); } } @Inject  ProvisioningManagementPerspective(final Caller<ProviderTypeService> providerTypeService,
                                             final Caller<RuntimeService> runtimeService,
                                             final EnableProviderTypeWizard enableProviderTypeWizard,
                                             final NewProviderWizard newProviderWizard,
                                             final NewDeployWizard newDeployWizard,
                                             final ClientProviderHandlerRegistry handlerRegistry); }
ProvisioningManagementPerspective { protected void onAddNewRuntime(@Observes final AddNewRuntimeEvent event) { if (event.getProvider() != null) { runtimeService.call((Collection<PipelineKey> result) -> { newDeployWizard.start(event.getProvider(), result); }).getPipelines(event.getProvider().getKey().getProviderTypeKey()); } } @Inject  ProvisioningManagementPerspective(final Caller<ProviderTypeService> providerTypeService,
                                             final Caller<RuntimeService> runtimeService,
                                             final EnableProviderTypeWizard enableProviderTypeWizard,
                                             final NewProviderWizard newProviderWizard,
                                             final NewDeployWizard newDeployWizard,
                                             final ClientProviderHandlerRegistry handlerRegistry); @Perspective PerspectiveDefinition buildPerspective(); }
ProvisioningManagementPerspective { protected void onAddNewRuntime(@Observes final AddNewRuntimeEvent event) { if (event.getProvider() != null) { runtimeService.call((Collection<PipelineKey> result) -> { newDeployWizard.start(event.getProvider(), result); }).getPipelines(event.getProvider().getKey().getProviderTypeKey()); } } @Inject  ProvisioningManagementPerspective(final Caller<ProviderTypeService> providerTypeService,
                                             final Caller<RuntimeService> runtimeService,
                                             final EnableProviderTypeWizard enableProviderTypeWizard,
                                             final NewProviderWizard newProviderWizard,
                                             final NewDeployWizard newDeployWizard,
                                             final ClientProviderHandlerRegistry handlerRegistry); @Perspective PerspectiveDefinition buildPerspective(); static final String IDENTIFIER; }