Search in sources :

Example 6 with ContainerSpecKey

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

the class ContainerProcessConfigPresenterTest method testSetup.

@Test
public void testSetup() {
    final ContainerSpecKey containerSpecKey = new ContainerSpecKey("id", "container-name", new ServerTemplateKey("template-id", "template-name"));
    final ProcessConfig processConfig = new ProcessConfig(RuntimeStrategy.PER_REQUEST.toString(), "kbase", "ksession", MergeMode.KEEP_ALL.toString());
    presenter.setup(containerSpecKey, processConfig);
    verify(view).enableActions();
    verify(processConfigPresenter).setup(containerSpecKey, processConfig);
    verify(processConfigPresenter).setProcessConfig(processConfig);
}
Also used : ServerTemplateKey(org.kie.server.controller.api.model.spec.ServerTemplateKey) ProcessConfig(org.kie.server.controller.api.model.spec.ProcessConfig) ContainerSpecKey(org.kie.server.controller.api.model.spec.ContainerSpecKey) Test(org.junit.Test)

Example 7 with ContainerSpecKey

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

the class ContainerRulesConfigPresenterTest method testOnConfigUpdateNoUpdate.

@Test
public void testOnConfigUpdateNoUpdate() {
    final RuleConfigUpdated ruleConfigUpdated = new RuleConfigUpdated();
    ruleConfigUpdated.setContainerSpecKey(new ContainerSpecKey());
    ruleConfigUpdated.setRuleConfig(new RuleConfig());
    presenter.setup(containerSpec, ruleConfig);
    presenter.onConfigUpdate(ruleConfigUpdated);
    verify(view).setContent(anyString(), anyString(), any(State.class), any(State.class), any(State.class), any(State.class));
}
Also used : RuleConfigUpdated(org.kie.server.controller.api.model.events.RuleConfigUpdated) State(org.kie.workbench.common.screens.server.management.client.util.State) RuleConfig(org.kie.server.controller.api.model.spec.RuleConfig) ContainerSpecKey(org.kie.server.controller.api.model.spec.ContainerSpecKey) Test(org.junit.Test)

Example 8 with ContainerSpecKey

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

the class ProcessConfigPresenterTest method testSetup.

@Test
public void testSetup() {
    final ContainerSpecKey containerSpecKey = new ContainerSpecKey();
    final ProcessConfig processConfig = new ProcessConfig(ClientRuntimeStrategy.PER_CASE.toString(), "kBase", "kSession", ClientMergeMode.KEEP_ALL.toString());
    presenter.setup(containerSpecKey, processConfig);
    verify(view).setContent(ClientRuntimeStrategy.PER_CASE.getValue(translationService), processConfig.getKBase(), processConfig.getKSession(), ClientMergeMode.convert(processConfig.getMergeMode(), translationService).getValue(translationService));
    assertEquals(containerSpecKey, presenter.getContainerSpecKey());
    assertEquals(processConfig, presenter.getProcessConfig());
    presenter.clear();
    assertNull(presenter.getContainerSpecKey());
    assertNull(presenter.getProcessConfig());
}
Also used : ProcessConfig(org.kie.server.controller.api.model.spec.ProcessConfig) ContainerSpecKey(org.kie.server.controller.api.model.spec.ContainerSpecKey) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)8 ContainerSpecKey (org.kie.server.controller.api.model.spec.ContainerSpecKey)8 ServerTemplateKey (org.kie.server.controller.api.model.spec.ServerTemplateKey)5 ContainerSpecSelected (org.kie.workbench.common.screens.server.management.client.events.ContainerSpecSelected)3 ProcessConfig (org.kie.server.controller.api.model.spec.ProcessConfig)2 Message (org.kie.server.api.model.Message)1 ReleaseId (org.kie.server.api.model.ReleaseId)1 RuleConfigUpdated (org.kie.server.controller.api.model.events.RuleConfigUpdated)1 Container (org.kie.server.controller.api.model.runtime.Container)1 ServerInstanceKey (org.kie.server.controller.api.model.runtime.ServerInstanceKey)1 RuleConfig (org.kie.server.controller.api.model.spec.RuleConfig)1 ContainerPresenter (org.kie.workbench.common.screens.server.management.client.container.ContainerPresenter)1 RefreshRemoteServers (org.kie.workbench.common.screens.server.management.client.events.RefreshRemoteServers)1 State (org.kie.workbench.common.screens.server.management.client.util.State)1 CardPresenter (org.kie.workbench.common.screens.server.management.client.widget.card.CardPresenter)1 BodyPresenter (org.kie.workbench.common.screens.server.management.client.widget.card.body.BodyPresenter)1 FooterPresenter (org.kie.workbench.common.screens.server.management.client.widget.card.footer.FooterPresenter)1 InfoTitlePresenter (org.kie.workbench.common.screens.server.management.client.widget.card.title.InfoTitlePresenter)1 LinkTitlePresenter (org.kie.workbench.common.screens.server.management.client.widget.card.title.LinkTitlePresenter)1 ContainerSpecData (org.kie.workbench.common.screens.server.management.model.ContainerSpecData)1