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);
}
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));
}
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());
}
Aggregations