Search in sources :

Example 21 with Container

use of org.kie.server.controller.api.model.runtime.Container 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

Container (org.kie.server.controller.api.model.runtime.Container)21 Test (org.junit.Test)13 ServerInstanceKey (org.kie.server.controller.api.model.runtime.ServerInstanceKey)12 ContainerSpec (org.kie.server.controller.api.model.spec.ContainerSpec)7 ReleaseId (org.kie.server.api.model.ReleaseId)6 ServerTemplate (org.kie.server.controller.api.model.spec.ServerTemplate)5 ServerTemplateKey (org.kie.server.controller.api.model.spec.ServerTemplateKey)5 ContainerCardPresenter (org.kie.workbench.common.screens.server.management.client.container.status.card.ContainerCardPresenter)4 HashMap (java.util.HashMap)3 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)3 Message (org.kie.server.api.model.Message)3 ServerInstance (org.kie.server.controller.api.model.runtime.ServerInstance)3 KieServerTemplateStorage (org.kie.server.controller.api.storage.KieServerTemplateStorage)3 ContainerSpecData (org.kie.workbench.common.screens.server.management.model.ContainerSpecData)3 ArrayList (java.util.ArrayList)2 ServerInstanceUpdated (org.kie.server.controller.api.model.events.ServerInstanceUpdated)2 Capability (org.kie.server.controller.api.model.spec.Capability)2 ContainerConfig (org.kie.server.controller.api.model.spec.ContainerConfig)2 ProcessConfig (org.kie.server.controller.api.model.spec.ProcessConfig)2 RuleConfig (org.kie.server.controller.api.model.spec.RuleConfig)2