Search in sources :

Example 1 with RefreshRemoteServers

use of org.kie.workbench.common.screens.server.management.client.events.RefreshRemoteServers in project kie-wb-common by kiegroup.

the class ContainerStatusEmptyPresenterTest method testRefresh.

@Test
public void testRefresh() {
    final ContainerSpecKey containerSpecKey = new ContainerSpecKey("id", "name", new ServerTemplateKey());
    presenter.setup(containerSpecKey);
    presenter.refresh();
    final ArgumentCaptor<RefreshRemoteServers> refreshRemoteServersCaptor = ArgumentCaptor.forClass(RefreshRemoteServers.class);
    verify(refreshRemoteServersEvent).fire(refreshRemoteServersCaptor.capture());
    assertEquals(containerSpecKey, refreshRemoteServersCaptor.getValue().getContainerSpecKey());
}
Also used : ServerTemplateKey(org.kie.server.controller.api.model.spec.ServerTemplateKey) RefreshRemoteServers(org.kie.workbench.common.screens.server.management.client.events.RefreshRemoteServers) ContainerSpecKey(org.kie.server.controller.api.model.spec.ContainerSpecKey) Test(org.junit.Test)

Example 2 with RefreshRemoteServers

use of org.kie.workbench.common.screens.server.management.client.events.RefreshRemoteServers in project kie-wb-common by kiegroup.

the class ContainerPresenterTest method testOnRefresh.

@Test
public void testOnRefresh() {
    when(runtimeManagementService.getContainersByContainerSpec(serverTemplateKey.getId(), containerSpec.getId())).thenReturn(containerSpecData);
    presenter.onRefresh(new RefreshRemoteServers(containerSpec));
    verifyLoad(true, 1);
}
Also used : RefreshRemoteServers(org.kie.workbench.common.screens.server.management.client.events.RefreshRemoteServers) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 RefreshRemoteServers (org.kie.workbench.common.screens.server.management.client.events.RefreshRemoteServers)2 ContainerSpecKey (org.kie.server.controller.api.model.spec.ContainerSpecKey)1 ServerTemplateKey (org.kie.server.controller.api.model.spec.ServerTemplateKey)1