diff options
author | ramverma <ram.krishna.verma@est.tech> | 2019-04-04 08:57:18 +0000 |
---|---|---|
committer | ramverma <ram.krishna.verma@est.tech> | 2019-04-04 08:57:18 +0000 |
commit | 0621ae5c8a1dfcfa81b678ae6cc8679b88f58cc4 (patch) | |
tree | 679c219fbffc39b876de0c3f4d7ee9c6ef8115fb /main/src/test | |
parent | 5769b4d5d7d8a7bf9788b2bbda781a9384df7626 (diff) |
Adding more code to pdp registration handler
1) Adding more code to pdp registration handler.
2) Fixing few broken files.
Change-Id: Ic8b68f95f7022ce0572345ea358ff380ec8a3e61
Issue-ID: POLICY-1443
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
Diffstat (limited to 'main/src/test')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java index e02e85c1..18e17b09 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java @@ -32,11 +32,11 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.junit.Test; +import org.onap.policy.models.pap.concepts.PdpDeployPolicies; import org.onap.policy.models.pap.concepts.PdpGroupDeployResponse; -import org.onap.policy.models.pap.concepts.PdpPolicies; -import org.onap.policy.models.pap.concepts.Policy; import org.onap.policy.models.pdp.concepts.PdpGroup; import org.onap.policy.models.pdp.concepts.PdpSubGroup; +import org.onap.policy.models.pdp.concepts.ToscaPolicyIdentifierOptVersion; public class TestPdpGroupDeployControllerV1 extends CommonPapRestServer { @@ -70,7 +70,7 @@ public class TestPdpGroupDeployControllerV1 extends CommonPapRestServer { @Test public void testDeployPolicies() throws Exception { - final Entity<PdpPolicies> entgrp = makePdpPoliciesEntity(); + final Entity<PdpDeployPolicies> entgrp = makePdpPoliciesEntity(); final Invocation.Builder invocationBuilder = sendRequest(DEPLOY_POLICIES_ENDPOINT); Response rawresp = invocationBuilder.post(entgrp); @@ -100,15 +100,15 @@ public class TestPdpGroupDeployControllerV1 extends CommonPapRestServer { return Entity.entity(group, MediaType.APPLICATION_JSON); } - private Entity<PdpPolicies> makePdpPoliciesEntity() { - final Policy pol1 = new Policy(); + private Entity<PdpDeployPolicies> makePdpPoliciesEntity() { + final ToscaPolicyIdentifierOptVersion pol1 = new ToscaPolicyIdentifierOptVersion(); pol1.setName("policy-a"); - pol1.setPolicyVersion("1"); + pol1.setVersion("1"); - final Policy pol2 = new Policy(); + final ToscaPolicyIdentifierOptVersion pol2 = new ToscaPolicyIdentifierOptVersion(); pol2.setName("policy-b"); - final PdpPolicies policies = new PdpPolicies(); + final PdpDeployPolicies policies = new PdpDeployPolicies(); policies.setPolicies(Arrays.asList(pol1, pol2)); return Entity.entity(policies, MediaType.APPLICATION_JSON); |