summaryrefslogtreecommitdiffstats
path: root/controlloop/common/policy-yaml/src/test
diff options
context:
space:
mode:
authorKrishnajinka <kris.jinka@samsung.com>2018-11-07 19:16:43 +0900
committerKrishnajinka <kris.jinka@samsung.com>2018-11-07 19:42:59 +0900
commit91fe0bcd2d0212f949587ec82d93109946491d63 (patch)
treed3e9be0246e5afb234e27749b7102ecd6dc8bf47 /controlloop/common/policy-yaml/src/test
parent72d4564ec8089f6217e7a3773a2aa0dde6306241 (diff)
Apply builder pattern for policy
Fix an issue reported by sonar for using more than 7 parameters in the method. Fix imports order in files. Fix line lengths to less than 120 chars Issue-ID: POLICY-1251 Change-Id: I42defc9d6acf970bb555c4a6c5d172241231e483 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
Diffstat (limited to 'controlloop/common/policy-yaml/src/test')
-rw-r--r--controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/PolicyTest.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/PolicyTest.java b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/PolicyTest.java
index 6e13b326b..d903b1534 100644
--- a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/PolicyTest.java
+++ b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/PolicyTest.java
@@ -161,7 +161,17 @@ public class PolicyTest {
Target target = new Target();
target.setResourceID("myresourceD");
- policy = new Policy("idD", "nameD", "descD", "actorD", payload, target, "recipeD", 301, 302);
+ policy = new Policy(
+ PolicyParam.builder().id("idD")
+ .name("nameD")
+ .description("descD")
+ .actor("actorD")
+ .payload(payload)
+ .target(target)
+ .recipe("recipeD")
+ .retries(301)
+ .timeout(302)
+ .build());
assertEquals("idD", policy.getId());
assertEquals("nameD", policy.getName());
assertEquals("descD", policy.getDescription());