use of org.guvnor.ala.ui.events.RuntimeChangeEvent in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testOnOtherRuntimeStarted.
@Test
public void testOnOtherRuntimeStarted() {
prepareRuntime();
RuntimeKey otherKey = mock(RuntimeKey.class);
presenter.onRuntimeChangeEvent(new RuntimeChangeEvent(RuntimeChange.STARTED, otherKey));
verify(presenter, never()).refresh(any(RuntimeKey.class));
}
use of org.guvnor.ala.ui.events.RuntimeChangeEvent in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testOnOtherRuntimeStopped.
@Test
public void testOnOtherRuntimeStopped() {
prepareRuntime();
RuntimeKey otherKey = mock(RuntimeKey.class);
presenter.onRuntimeChangeEvent(new RuntimeChangeEvent(RuntimeChange.STOPPED, otherKey));
verify(presenter, never()).refresh(any(RuntimeKey.class));
}
use of org.guvnor.ala.ui.events.RuntimeChangeEvent in project kie-wb-common by kiegroup.
the class RuntimeServiceImpl method startRuntime.
@Override
public void startRuntime(final RuntimeKey runtimeKey) {
checkNotNull("runtimeKey", runtimeKey);
runtimeProvisioningService.startRuntime(runtimeKey.getId());
runtimeChangeEvent.fire(new RuntimeChangeEvent(RuntimeChange.STARTED, runtimeKey));
}
use of org.guvnor.ala.ui.events.RuntimeChangeEvent in project kie-wb-common by kiegroup.
the class RuntimeServiceImplTest method testStopRuntime.
@Test
public void testStopRuntime() {
ProviderKey providerKey = mock(ProviderKey.class);
RuntimeKey runtimeKey = new RuntimeKey(providerKey, RUNTIME_ID);
service.stopRuntime(runtimeKey);
verify(runtimeProvisioningService, times(1)).stopRuntime(RUNTIME_ID);
verify(runtimeChangeEvent, times(1)).fire(new RuntimeChangeEvent(RuntimeChange.STOPPED, runtimeKey));
}
use of org.guvnor.ala.ui.events.RuntimeChangeEvent in project kie-wb-common by kiegroup.
the class RuntimeServiceImplTest method testStartRuntime.
@Test
public void testStartRuntime() {
ProviderKey providerKey = mock(ProviderKey.class);
RuntimeKey runtimeKey = new RuntimeKey(providerKey, RUNTIME_ID);
service.startRuntime(runtimeKey);
verify(runtimeProvisioningService, times(1)).startRuntime(RUNTIME_ID);
verify(runtimeChangeEvent, times(1)).fire(new RuntimeChangeEvent(RuntimeChange.STARTED, runtimeKey));
}
Aggregations