use of org.guvnor.ala.ui.client.events.ProviderSelectedEvent 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.ProviderSelectedEvent in project kie-wb-common by kiegroup.
the class ProvisioningManagementBrowserPresenterTest method testOnProviderSelected.
@Test
public void testOnProviderSelected() {
presenter.onProviderSelected(new ProviderSelectedEvent(mock(ProviderKey.class)));
verify(view, times(1)).setContent(providerPresenterView);
}
use of org.guvnor.ala.ui.client.events.ProviderSelectedEvent in project kie-wb-common by kiegroup.
the class ProviderTypePresenterTest method testSetup.
@Test
public void testSetup() {
presenter.setup(providerType, providers, provider);
verify(view, times(1)).clear();
verify(view, times(1)).setProviderTypeName(getDisplayableProviderTypeName(providerType));
providers.forEach(providerKey -> verify(view, times(1)).addProvider(eq(provider.getId()), eq(provider.getId()), any(Command.class)));
verify(providerSelectedEvent, times(1)).fire(new ProviderSelectedEvent(provider));
}
use of org.guvnor.ala.ui.client.events.ProviderSelectedEvent in project kie-wb-common by kiegroup.
the class ProviderPresenterTest method testOnProviderSelectedWithRuntimes.
@Test
public void testOnProviderSelectedWithRuntimes() {
prepareRuntimesInfo();
// emulate that there are runtimes.
when(runtimeItems.isEmpty()).thenReturn(false);
presenter.onProviderSelected(new ProviderSelectedEvent(providerKey));
// the ui must have been loaded with the items.
verifyUILoadedWithItems(1);
// common verifications.
verifyRuntimesInfoLoaded(1);
}
use of org.guvnor.ala.ui.client.events.ProviderSelectedEvent in project kie-wb-common by kiegroup.
the class ProviderPresenterTest method testOnProviderSelectedWithNoRuntimes.
@Test
public void testOnProviderSelectedWithNoRuntimes() {
prepareRuntimesInfo();
// emulate that there are no runtimes.
when(runtimeItems.isEmpty()).thenReturn(true);
presenter.onProviderSelected(new ProviderSelectedEvent(providerKey));
verifyUILoadedWithNoItems(1);
// common verifications.
verifyRuntimesInfoLoaded(1);
}
Aggregations