From 0621ae5c8a1dfcfa81b678ae6cc8679b88f58cc4 Mon Sep 17 00:00:00 2001 From: ramverma Date: Thu, 4 Apr 2019 08:57:18 +0000 Subject: 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 --- .../pap/main/rest/TestPdpGroupDeployControllerV1.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'main/src/test/java/org') 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 entgrp = makePdpPoliciesEntity(); + final Entity 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 makePdpPoliciesEntity() { - final Policy pol1 = new Policy(); + private Entity 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); -- cgit 1.2.3-korg