diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-04-10 14:20:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-10 14:20:47 +0000 |
commit | bfb8d12818346b96c9ab918e72327e1d13662321 (patch) | |
tree | 1f55b2dd72d4629593d20fd3d3cee52db231c25b /applications/optimization/src/test | |
parent | ccb1828ec3e1a1c9071256f85f3876a8d1c8ecdf (diff) | |
parent | e034d785a227815f66138d1f83f49624c402aa97 (diff) |
Merge "Test decision from main entry"
Diffstat (limited to 'applications/optimization/src/test')
-rw-r--r-- | applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java b/applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java index efbf730c..e593d5fe 100644 --- a/applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java +++ b/applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java @@ -47,6 +47,8 @@ import org.onap.policy.common.utils.coder.StandardCoder; import org.onap.policy.common.utils.resources.TextFileUtils; import org.onap.policy.models.decisions.concepts.DecisionRequest; import org.onap.policy.models.decisions.concepts.DecisionResponse; +import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier; +import org.onap.policy.pdp.xacml.application.common.XacmlApplicationException; import org.onap.policy.pdp.xacml.application.common.XacmlApplicationServiceProvider; import org.onap.policy.pdp.xacml.application.common.XacmlPolicyUtils; import org.slf4j.Logger; @@ -139,8 +141,10 @@ public class OptimizationPdpApplicationTest { // Ensure it has the supported policy types and // can support the correct policy types. // - assertThat(service.canSupportPolicyType("onap.policies.optimization.AffinityPolicy", "1.0.0")).isTrue(); - assertThat(service.canSupportPolicyType("onap.foobar", "1.0.0")).isFalse(); + assertThat(service.canSupportPolicyType(new ToscaPolicyTypeIdentifier( + "onap.policies.optimization.AffinityPolicy", "1.0.0"))).isTrue(); + assertThat(service.canSupportPolicyType(new ToscaPolicyTypeIdentifier( + "onap.foobar", "1.0.0"))).isFalse(); } @Test @@ -157,7 +161,8 @@ public class OptimizationPdpApplicationTest { @SuppressWarnings("unchecked") @Test - public void test3AddOptimizationPolicies() throws CoderException, FileNotFoundException, IOException { + public void test3AddOptimizationPolicies() throws CoderException, FileNotFoundException, IOException, + XacmlApplicationException { // // Now load the optimization policies // @@ -184,8 +189,9 @@ public class OptimizationPdpApplicationTest { // assertThat(policyDefinition.containsKey("type")).isTrue(); assertThat(service.canSupportPolicyType( + new ToscaPolicyTypeIdentifier( policyDefinition.get("type").toString(), - policyDefinition.get("version").toString())) + policyDefinition.get("version").toString()))) .isTrue(); } } |