use of org.guvnor.ala.ui.client.events.AddNewRuntimeEvent in project kie-wb-common by kiegroup.
the class ProviderPresenterTest method testDeploy.
@Test
public void testDeploy() {
// emulate that the provider was previously loaded.
prepareRuntimesInfo();
presenter.onProviderSelected(new ProviderSelectedEvent(providerKey));
// emulate the user adding a new deploy.
presenter.deploy();
verify(addNewRuntimeEvent, times(1)).fire(new AddNewRuntimeEvent(provider));
}
use of org.guvnor.ala.ui.client.events.AddNewRuntimeEvent in project kie-wb-common by kiegroup.
the class ProvisioningManagementPerspectiveTest method testAddNewRuntime.
@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);
}
Aggregations