diff options
author | Liam Fallon <liam.fallon@est.tech> | 2019-03-27 09:20:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-27 09:20:18 +0000 |
commit | df3fbb6f39b670a014ddf52067cf01624033c4f3 (patch) | |
tree | 67bb2f77326132d7bcb46913132606718b86dcb9 /models-tosca | |
parent | 38e3ea9ff6a0a1534a30655e22082cf4c8d887d0 (diff) | |
parent | c7a12fc31e14225d8c6c3cbd6850c80beda56ff0 (diff) |
Merge "Fix file access issue in DummyProviderImpl"
Diffstat (limited to 'models-tosca')
2 files changed, 4 insertions, 8 deletions
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicy.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicy.java index 2454b51be..59715e4f9 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicy.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicy.java @@ -21,7 +21,6 @@ package org.onap.policy.models.tosca.legacy.concepts; -import java.util.List; import java.util.Map; import lombok.Data; @@ -30,6 +29,7 @@ import lombok.Data; * Definition of a legacy guard policy stored as a TOSCA policy. * * @author Liam Fallon (liam.fallon@est.tech) + * @author Chenfei Gao (cgao@research.att.com) */ @Data public class LegacyGuardPolicy { @@ -38,6 +38,6 @@ public class LegacyGuardPolicy { private String policyVersion; - private List<Map<String, String>> content; + private Map<String, String> content; } diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicyTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicyTest.java index d2b2216e7..764ce063f 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicyTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicyTest.java @@ -23,9 +23,7 @@ package org.onap.policy.models.tosca.legacy.concepts; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.junit.Test; @@ -41,10 +39,8 @@ public class LegacyGuardPolicyTest { assertEquals("guard.frequency", guard.getPolicyId()); guard.setPolicyVersion("1"); assertEquals("1", guard.getPolicyVersion()); - Map<String, String> body = new HashMap<>(); - body.put("actor", "SO"); - List<Map<String, String>> content = new ArrayList<>(); - content.add(body); + Map<String, String> content = new HashMap<>(); + content.put("actor", "SO"); guard.setContent(content); assertEquals(1, guard.getContent().size()); } |