Search in sources :

Example 1 with RuleConfigUpdated

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

the class ContainerRulesConfigPresenterTest method testOnConfigUpdate.

@Test
public void testOnConfigUpdate() {
    final RuleConfigUpdated ruleConfigUpdated = new RuleConfigUpdated();
    ruleConfigUpdated.setContainerSpecKey(containerSpec);
    ruleConfigUpdated.setRuleConfig(ruleConfig);
    presenter.setup(containerSpec, ruleConfig);
    presenter.onConfigUpdate(ruleConfigUpdated);
    verify(view, times(2)).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) Test(org.junit.Test)

Example 2 with RuleConfigUpdated

use of org.kie.server.controller.api.model.events.RuleConfigUpdated 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 3 with RuleConfigUpdated

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

the class ContainerRulesConfigPresenterTest method testOnRuleConfigUpdate.

@Test
public void testOnRuleConfigUpdate() {
    final RuleConfigUpdated ruleConfigUpdated = new RuleConfigUpdated();
    ruleConfigUpdated.setRuleConfig(ruleConfig);
    ruleConfigUpdated.setReleasedId(releaseId);
    final Long poolInterval = 1l;
    when(ruleConfig.getPollInterval()).thenReturn(poolInterval);
    presenter.onRuleConfigUpdate(ruleConfigUpdated);
    verify(view).setContent(eq(String.valueOf(poolInterval)), 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) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)3 RuleConfigUpdated (org.kie.server.controller.api.model.events.RuleConfigUpdated)3 State (org.kie.workbench.common.screens.server.management.client.util.State)3 ContainerSpecKey (org.kie.server.controller.api.model.spec.ContainerSpecKey)1 RuleConfig (org.kie.server.controller.api.model.spec.RuleConfig)1