Search in sources :

Example 31 with ServerInstanceKey

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

the class RemoteStatusPresenterTest method testSetup.

@Test
public void testSetup() {
    final Container container = new Container("containerSpecId", "containerName", new ServerInstanceKey(), Collections.<Message>emptyList(), null, null);
    presenter.setup(Collections.singletonList(container));
    verify(containerCardPresenter).setup(container);
    verify(view).addCard(any(Widget.class));
}
Also used : Container(org.kie.server.controller.api.model.runtime.Container) Widget(com.google.gwt.user.client.ui.Widget) ServerInstanceKey(org.kie.server.controller.api.model.runtime.ServerInstanceKey) Test(org.junit.Test)

Example 32 with ServerInstanceKey

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

the class ConvertTest method testToKey.

@Test
public void testToKey() {
    final String serverTemplateId = "serverTemplateId";
    final String serverName = "serverName";
    final String serverInstanceId = "serverInstanceId";
    final String url = "url";
    ServerInstance serverInstance = new ServerInstance(serverTemplateId, serverName, serverInstanceId, url, "version", new ArrayList<Message>(), new ArrayList<Container>());
    ServerInstanceKey key = Convert.toKey(serverInstance);
    assertEquals(serverTemplateId, key.getServerTemplateId());
    assertEquals(serverName, key.getServerName());
    assertEquals(serverInstanceId, key.getServerInstanceId());
    assertEquals(url, key.getUrl());
}
Also used : Container(org.kie.server.controller.api.model.runtime.Container) Message(org.kie.server.api.model.Message) ServerInstanceKey(org.kie.server.controller.api.model.runtime.ServerInstanceKey) ServerInstance(org.kie.server.controller.api.model.runtime.ServerInstance) Test(org.junit.Test)

Aggregations

ServerInstanceKey (org.kie.server.controller.api.model.runtime.ServerInstanceKey)32 Test (org.junit.Test)28 Container (org.kie.server.controller.api.model.runtime.Container)12 ContainerSpec (org.kie.server.controller.api.model.spec.ContainerSpec)11 ServerTemplate (org.kie.server.controller.api.model.spec.ServerTemplate)11 ReleaseId (org.kie.server.api.model.ReleaseId)7 ServerInstanceSelected (org.kie.workbench.common.screens.server.management.client.events.ServerInstanceSelected)7 ArrayList (java.util.ArrayList)5 ServerTemplateKey (org.kie.server.controller.api.model.spec.ServerTemplateKey)5 NotificationEvent (org.uberfire.workbench.events.NotificationEvent)5 ServerTemplateMigration (org.kie.workbench.common.screens.server.management.backend.storage.migration.ServerTemplateMigration)4 ContainerUpdateEvent (org.kie.workbench.common.screens.server.management.model.ContainerUpdateEvent)4 Path (org.uberfire.java.nio.file.Path)4 Message (org.kie.server.api.model.Message)3 ServerInstanceDeleted (org.kie.server.controller.api.model.events.ServerInstanceDeleted)3 ProcessConfig (org.kie.server.controller.api.model.spec.ProcessConfig)3 RuleConfig (org.kie.server.controller.api.model.spec.RuleConfig)3 ContainerSpecSelected (org.kie.workbench.common.screens.server.management.client.events.ContainerSpecSelected)3 Command (org.uberfire.mvp.Command)3 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)2