diff options
Diffstat (limited to 'controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java')
-rw-r--r-- | controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java index f3c6e058d..6dc9c1c14 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopParamsCleanupTest.java @@ -37,7 +37,7 @@ import org.junit.Test; import org.kie.api.runtime.KieSession; import org.onap.policy.controlloop.policy.ControlLoopPolicy; import org.onap.policy.drools.utils.logging.LoggerUtil; -import org.onap.policy.template.demo.Util.Pair; +import org.onap.policy.template.demo.SupportUtil.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -74,7 +74,7 @@ public class ControlLoopParamsCleanupTest { private static final String CONTROL_LOOP_NAME_B = "ControlLoop-Params-Cleanup-Test-B"; private static KieSession kieSession; - private static Util.RuleSpec[] specifications; + private static SupportUtil.RuleSpec[] specifications; /** * Setup the simulator. @@ -84,15 +84,15 @@ public class ControlLoopParamsCleanupTest { LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO"); try { - specifications = new Util.RuleSpec[2]; + specifications = new SupportUtil.RuleSpec[2]; - specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME, + specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME, POLICY_VERSION, loadYaml(YAML)); - specifications[1] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B, - POLICY_VERSION, loadYaml(YAML_B)); + specifications[1] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, + POLICY_NAME_B, POLICY_VERSION, loadYaml(YAML_B)); - kieSession = Util.buildContainer(POLICY_VERSION, specifications); + kieSession = SupportUtil.buildContainer(POLICY_VERSION, specifications); } catch (IOException e) { logger.error("Could not create kieSession", e); @@ -185,17 +185,17 @@ public class ControlLoopParamsCleanupTest { * effect, so then we'll update the second rule set, which should trigger a * clean-up of both. */ - Util.RuleSpec[] specs = new Util.RuleSpec[1]; + SupportUtil.RuleSpec[] specs = new SupportUtil.RuleSpec[1]; specs[0] = specifications[1]; logger.info("UPDATING VERSION TO v5.0 - DELETED RULE SET"); - Util.updateContainer("v5.0", specs); + SupportUtil.updateContainer("v5.0", specs); - specs[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B, + specs[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME_B, POLICY_SCOPE, POLICY_NAME_B, POLICY_VERSION, loadYaml(YAML)); logger.info("UPDATING VERSION TO v6.0 - UPDATED SECOND RULE SET"); - Util.updateContainer("v6.0", specs); + SupportUtil.updateContainer("v6.0", specs); kieSession.fireAllRules(); facts = getSessionObjects(); @@ -213,13 +213,13 @@ public class ControlLoopParamsCleanupTest { */ private static void updatePolicy(String yamlFile, String policyVersion) throws IOException { - specifications[0] = new Util.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME, + specifications[0] = new SupportUtil.RuleSpec(DROOLS_TEMPLATE, CONTROL_LOOP_NAME, POLICY_SCOPE, POLICY_NAME, policyVersion, loadYaml(yamlFile)); /* * Update the policy within the container. */ - Util.updateContainer(policyVersion, specifications); + SupportUtil.updateContainer(policyVersion, specifications); } /** @@ -230,7 +230,7 @@ public class ControlLoopParamsCleanupTest { * @throws UnsupportedEncodingException if an error occurs */ private static String loadYaml(String yamlFile) throws UnsupportedEncodingException { - Pair<ControlLoopPolicy, String> pair = Util.loadYaml(yamlFile); + Pair<ControlLoopPolicy, String> pair = SupportUtil.loadYaml(yamlFile); assertNotNull(pair); assertNotNull(pair.first); assertNotNull(pair.first.getControlLoop()); |