Search in sources :

Example 11 with ServerInstanceUpdated

use of org.kie.server.controller.api.model.events.ServerInstanceUpdated in project kie-wb-common by kiegroup.

the class RemotePresenterTest method testOnInstanceUpdate.

@Test
public void testOnInstanceUpdate() {
    final ServerInstance serverInstance = new ServerInstance("templateId", "serverName", "serverInstanceId", "url", "1.0", Collections.<Message>emptyList(), Collections.<Container>emptyList());
    presenter.onSelect(new ServerInstanceSelected(serverInstance));
    presenter.onInstanceUpdate(new ServerInstanceUpdated(serverInstance));
    verify(view, times(2)).clear();
    verify(view, times(2)).setServerName(serverInstance.getServerName());
    verify(view, times(2)).setServerURL(serverInstance.getUrl());
    verify(view, times(2)).setEmptyView(remoteEmptyPresenter.getView());
}
Also used : ServerInstanceUpdated(org.kie.server.controller.api.model.events.ServerInstanceUpdated) ServerInstance(org.kie.server.controller.api.model.runtime.ServerInstance) ServerInstanceSelected(org.kie.workbench.common.screens.server.management.client.events.ServerInstanceSelected) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)11 ServerInstanceUpdated (org.kie.server.controller.api.model.events.ServerInstanceUpdated)11 ServerInstance (org.kie.server.controller.api.model.runtime.ServerInstance)9 Container (org.kie.server.controller.api.model.runtime.Container)3 ContainerSpec (org.kie.server.controller.api.model.spec.ContainerSpec)3 ContainerCardPresenter (org.kie.workbench.common.screens.server.management.client.container.status.card.ContainerCardPresenter)3 ServerInstanceDeleted (org.kie.server.controller.api.model.events.ServerInstanceDeleted)2 ServerTemplate (org.kie.server.controller.api.model.spec.ServerTemplate)2 ServerInstanceSelected (org.kie.workbench.common.screens.server.management.client.events.ServerInstanceSelected)2 Command (org.uberfire.mvp.Command)2 ParameterizedCommand (org.uberfire.mvp.ParameterizedCommand)2 URL (java.net.URL)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)1 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)1 ReleaseId (org.kie.server.api.model.ReleaseId)1 ContainerSpecUpdated (org.kie.server.controller.api.model.events.ContainerSpecUpdated)1 ServerInstanceConnected (org.kie.server.controller.api.model.events.ServerInstanceConnected)1 ServerInstanceDisconnected (org.kie.server.controller.api.model.events.ServerInstanceDisconnected)1 ServerTemplateDeleted (org.kie.server.controller.api.model.events.ServerTemplateDeleted)1