summaryrefslogtreecommitdiffstats
path: root/controlloop/common/guard/src/test
diff options
context:
space:
mode:
authorRashmi Pujar <rashmi.pujar@bell.ca>2019-06-18 14:53:00 -0400
committerRashmi Pujar <rashmi.pujar@bell.ca>2019-06-18 15:12:36 -0400
commitd4704a70405cae2f6d9cb32ca30828db14be01b7 (patch)
treef9fd53e1609b3f2c70ad1a65d0b61275d4fa8093 /controlloop/common/guard/src/test
parentbf6126968adcabff605775f554642dfff0644530 (diff)
Fix build issues in drools-applications due to changes in policy/models repo
Issue-ID: POLICY-1791 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ife7cbb07c3bb674257bb1979d80f4f8a7ddfc3a5
Diffstat (limited to 'controlloop/common/guard/src/test')
-rw-r--r--controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java25
1 files changed, 14 insertions, 11 deletions
diff --git a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java
index dced2889d..a35696dec 100644
--- a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java
+++ b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardYamlToXacmlTest.java
@@ -116,10 +116,11 @@ public class PolicyGuardYamlToXacmlTest {
final File tempXacmlTemplateFile = new File("src/test/resources/frequency_limiter_template.xml");
final File tempXacmlOutputFile = File.createTempFile("ONAPPF", ".out.xacml");
- clGuard.getGuards().getFirst().getMatch_parameters().setControlLoopName(null);
- clGuard.getGuards().getFirst().getMatch_parameters().setActor(null);
- clGuard.getGuards().getFirst().getMatch_parameters().setRecipe(null);
- clGuard.getGuards().getFirst().getMatch_parameters().setTargets(null);
+ MatchParameters matchParameters = clGuard.getGuards().get(0).getMatch_parameters();
+ matchParameters.setControlLoopName(null);
+ matchParameters.setActor(null);
+ matchParameters.setRecipe(null);
+ matchParameters.setTargets(null);
Yaml clYaml = new Yaml(new Constructor(ControlLoopGuard.class));
String clYamlString = clYaml.dump(clGuard);
@@ -179,7 +180,7 @@ public class PolicyGuardYamlToXacmlTest {
List<String> blacklist = new ArrayList<>();
blacklist.add("WestWitches");
blacklist.add("EastWitches");
- clGuard.getGuards().getFirst().getLimit_constraints().getFirst().setBlacklist(blacklist);
+ clGuard.getGuards().get(0).getLimit_constraints().get(0).setBlacklist(blacklist);
Yaml clYaml = new Yaml(new Constructor(ControlLoopGuard.class));
String clYamlString = clYaml.dump(clGuard);
@@ -210,12 +211,14 @@ public class PolicyGuardYamlToXacmlTest {
List<String> blacklist = new ArrayList<>();
blacklist.add("WestWitches");
blacklist.add("EastWitches");
- clGuard.getGuards().getFirst().getLimit_constraints().getFirst().setBlacklist(blacklist);
-
- clGuard.getGuards().getFirst().getMatch_parameters().setControlLoopName(null);
- clGuard.getGuards().getFirst().getMatch_parameters().setActor(null);
- clGuard.getGuards().getFirst().getMatch_parameters().setRecipe(null);
- clGuard.getGuards().getFirst().getMatch_parameters().setTargets(null);
+ GuardPolicy guardPolicy = clGuard.getGuards().get(0);
+ guardPolicy.getLimit_constraints().get(0).setBlacklist(blacklist);
+
+ MatchParameters matchParameters = guardPolicy.getMatch_parameters();
+ matchParameters.setControlLoopName(null);
+ matchParameters.setActor(null);
+ matchParameters.setRecipe(null);
+ matchParameters.setTargets(null);
Yaml clYaml = new Yaml(new Constructor(ControlLoopGuard.class));
String clYamlString = clYaml.dump(clGuard);