diff options
author | 2020-03-02 15:27:21 -0500 | |
---|---|---|
committer | 2020-03-03 09:42:51 -0500 | |
commit | ccc3e28512988345e640097381d2ae0be46fe986 (patch) | |
tree | e80d52e8d27c1492df9807e94296d79ce567fa1c /plugins/reception-plugins/src/test/java/org/onap | |
parent | 7b63879e6837a0242ca0d68540830031c55b4ed6 (diff) |
Remove policy/engine & apex dependency from distribution
Issue-ID: POLICY-2404
Change-Id: Ia3084c55ea65a3119354079d9afd3ee35689b7d4
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'plugins/reception-plugins/src/test/java/org/onap')
14 files changed, 71 insertions, 409 deletions
diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/CommonTestData.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/CommonTestData.java index 5006e078..62a6ba4d 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/CommonTestData.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/CommonTestData.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.policy.distribution.reception.decoding.pdpx; +package org.onap.policy.distribution.reception.decoding.hpa; import java.io.File; diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestAttribute.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestAttribute.java index 565f17d3..cf03ff30 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestAttribute.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestAttribute.java @@ -18,11 +18,12 @@ * ============LICENSE_END========================================================= */ -package org.onap.policy.distribution.reception.decoding.pdpx; +package org.onap.policy.distribution.reception.decoding.hpa; import static org.junit.Assert.assertEquals; import org.junit.Test; +import org.onap.policy.distribution.reception.decoding.hpa.Attribute; /** * Class to perform unit test for Attribute 0f {@link Attribute}. diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestContent.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestContent.java index da77eefb..3770bc77 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestContent.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestContent.java @@ -18,11 +18,13 @@ * ============LICENSE_END========================================================= */ -package org.onap.policy.distribution.reception.decoding.pdpx; +package org.onap.policy.distribution.reception.decoding.hpa; import static org.junit.Assert.assertEquals; import org.junit.Test; +import org.onap.policy.distribution.reception.decoding.hpa.Content; +import org.onap.policy.distribution.reception.decoding.hpa.FlavorFeature; /** * Class to perform unit test for Content 0f {@link Content}. diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestDirective.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestDirective.java index cc8d946f..9ab53931 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestDirective.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestDirective.java @@ -18,11 +18,13 @@ * ============LICENSE_END========================================================= */ -package org.onap.policy.distribution.reception.decoding.pdpx; +package org.onap.policy.distribution.reception.decoding.hpa; import static org.junit.Assert.assertEquals; import org.junit.Test; +import org.onap.policy.distribution.reception.decoding.hpa.Attribute; +import org.onap.policy.distribution.reception.decoding.hpa.Directive; /** * Class to perform unit test for Directive 0f {@link Directive}. diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestFlavorFeature.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestFlavorFeature.java index e4de2759..47b74c71 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestFlavorFeature.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestFlavorFeature.java @@ -18,11 +18,14 @@ * ============LICENSE_END========================================================= */ -package org.onap.policy.distribution.reception.decoding.pdpx; +package org.onap.policy.distribution.reception.decoding.hpa; import static org.junit.Assert.assertEquals; import org.junit.Test; +import org.onap.policy.distribution.reception.decoding.hpa.Directive; +import org.onap.policy.distribution.reception.decoding.hpa.FlavorFeature; +import org.onap.policy.distribution.reception.decoding.hpa.FlavorProperty; /** * Class to perform unit test for FlavorFeature 0f {@link FlavorFeature}. diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestFlavorProperty.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestFlavorProperty.java index da6c26fc..2d0504da 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestFlavorProperty.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestFlavorProperty.java @@ -18,11 +18,14 @@ * ============LICENSE_END========================================================= */ -package org.onap.policy.distribution.reception.decoding.pdpx; +package org.onap.policy.distribution.reception.decoding.hpa; import static org.junit.Assert.assertEquals; import org.junit.Test; +import org.onap.policy.distribution.reception.decoding.hpa.Directive; +import org.onap.policy.distribution.reception.decoding.hpa.FlavorProperty; +import org.onap.policy.distribution.reception.decoding.hpa.HpaFeatureAttribute; /** * Class to perform unit test for FlavorProperty 0f {@link FlavorProperty}. diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestHpaFeatureAttribute.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestHpaFeatureAttribute.java index f2f514d0..fddeb168 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestHpaFeatureAttribute.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestHpaFeatureAttribute.java @@ -18,11 +18,12 @@ * ============LICENSE_END========================================================= */ -package org.onap.policy.distribution.reception.decoding.pdpx; +package org.onap.policy.distribution.reception.decoding.hpa; import static org.junit.Assert.assertEquals; import org.junit.Test; +import org.onap.policy.distribution.reception.decoding.hpa.HpaFeatureAttribute; /** * Class to perform unit test for HpaFeatureAttribute 0f {@link HpaFeatureAttribute}. diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxLifecycleApi.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestPolicyDecoderCsarHpa.java index 3b8339a9..552f430e 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxLifecycleApi.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestPolicyDecoderCsarHpa.java @@ -19,16 +19,14 @@ * ============LICENSE_END========================================================= */ -package org.onap.policy.distribution.reception.decoding.pdpx; +package org.onap.policy.distribution.reception.decoding.hpa; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.io.IOException; -import java.lang.String; import java.util.Collection; import java.util.Map; - import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -38,15 +36,14 @@ import org.onap.policy.common.utils.coder.CoderException; import org.onap.policy.common.utils.coder.StandardCoder; import org.onap.policy.distribution.model.Csar; import org.onap.policy.distribution.reception.decoding.PolicyDecodingException; -import org.onap.policy.distribution.reception.decoding.pdpx.PolicyDecoderCsarPdpxLifecycleApi; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; import org.onap.policy.models.tosca.authorative.concepts.ToscaTopologyTemplate; /** - * Class to perform unit test of {@link PolicyDecoderCsarPdpxLifecycleApiLifecycleApi}. + * Class to perform unit test of {@link PolicyDecoderCsarHpa}. */ -public class TestPolicyDecoderCsarPdpxLifecycleApi { +public class TestPolicyDecoderCsarHpa { private final StandardCoder encoder = new StandardCoder(); @@ -56,9 +53,9 @@ public class TestPolicyDecoderCsarPdpxLifecycleApi { @BeforeClass public static void setUp() { final ParameterGroup parameterGroup = CommonTestData.getPolicyDecoderParameters( - "src/test/resources/parameters/PdpxPolicyDecoderParameters.json", - PolicyDecoderCsarPdpxLifecycleApiParameters.class); - parameterGroup.setName(PolicyDecoderCsarPdpxLifecycleApiParameters.class.getSimpleName()); + "src/test/resources/parameters/HpaPolicyDecoderParameters.json", + PolicyDecoderCsarHpaParameters.class); + parameterGroup.setName(PolicyDecoderCsarHpaParameters.class.getSimpleName()); ParameterService.register(parameterGroup); } @@ -67,25 +64,25 @@ public class TestPolicyDecoderCsarPdpxLifecycleApi { */ @AfterClass public static void tearDown() { - ParameterService.deregister(PolicyDecoderCsarPdpxLifecycleApiParameters.class.getSimpleName()); + ParameterService.deregister(PolicyDecoderCsarHpaParameters.class.getSimpleName()); } @Test public void testHpaPolicy2Vnf() throws IOException, PolicyDecodingException, CoderException { final Csar csar = new Csar("src/test/resources/service-TestNs8-csar.csar"); - final PolicyDecoderCsarPdpxLifecycleApi policyDecoderCsarPdpx = new PolicyDecoderCsarPdpxLifecycleApi(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxLifecycleApiParameters.class.getSimpleName()); + final PolicyDecoderCsarHpa policyDecoderCsarHpa = new PolicyDecoderCsarHpa(); + policyDecoderCsarHpa.configure(PolicyDecoderCsarHpaParameters.class.getSimpleName()); - final Collection<ToscaServiceTemplate> entities = policyDecoderCsarPdpx.decode(csar); + final Collection<ToscaServiceTemplate> entities = policyDecoderCsarHpa.decode(csar); assertEquals(2, entities.size()); final ToscaServiceTemplate entity = entities.iterator().next(); ToscaTopologyTemplate topologyTemplate = entity.getToscaTopologyTemplate(); Map<String, ToscaPolicy> map = topologyTemplate.getPolicies().get(0); - ToscaPolicy policy = map.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_HPA_OOF); + ToscaPolicy policy = map.get(PolicyDecoderCsarHpa.TOSCA_POLICY_HPA_OOF); Map<String, Object> props = policy.getProperties(); Object flavorFeatures = - props.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_FLAVORFEATURES); + props.get(PolicyDecoderCsarHpa.TOSCA_POLICY_FLAVORFEATURES); String features = encoder.encode(flavorFeatures); assertTrue(features.contains("\"id\":\"VDU_vgw_0\"")); assertTrue(features.contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); @@ -102,17 +99,17 @@ public class TestPolicyDecoderCsarPdpxLifecycleApi { @Test public void testHpaPolicySriov() throws IOException, PolicyDecodingException, CoderException { final Csar csar = new Csar("src/test/resources/hpaPolicySriov.csar"); - final PolicyDecoderCsarPdpxLifecycleApi policyDecoderCsarPdpx = new PolicyDecoderCsarPdpxLifecycleApi(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxLifecycleApiParameters.class.getSimpleName()); + final PolicyDecoderCsarHpa policyDecoderCsarHpa = new PolicyDecoderCsarHpa(); + policyDecoderCsarHpa.configure(PolicyDecoderCsarHpaParameters.class.getSimpleName()); - final Collection<ToscaServiceTemplate> entities = policyDecoderCsarPdpx.decode(csar); + final Collection<ToscaServiceTemplate> entities = policyDecoderCsarHpa.decode(csar); final ToscaServiceTemplate entity = entities.iterator().next(); ToscaTopologyTemplate topologyTemplate = entity.getToscaTopologyTemplate(); Map<String, ToscaPolicy> map = topologyTemplate.getPolicies().get(0); - ToscaPolicy policy = map.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_HPA_OOF); + ToscaPolicy policy = map.get(PolicyDecoderCsarHpa.TOSCA_POLICY_HPA_OOF); Map<String, Object> props = policy.getProperties(); Object flavorFeatures = - props.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_FLAVORFEATURES); + props.get(PolicyDecoderCsarHpa.TOSCA_POLICY_FLAVORFEATURES); String features = encoder.encode(flavorFeatures); assertTrue(features.contains("\"id\":\"VDU_vgw_0\"")); assertTrue(features.contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); @@ -140,18 +137,18 @@ public class TestPolicyDecoderCsarPdpxLifecycleApi { @Test public void testHpaPolicyPciePassthrough() throws IOException, PolicyDecodingException, CoderException { final Csar csar = new Csar("src/test/resources/hpaPolicyPciePassthrough.csar"); - final PolicyDecoderCsarPdpxLifecycleApi policyDecoderCsarPdpx = new PolicyDecoderCsarPdpxLifecycleApi(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxLifecycleApiParameters.class.getSimpleName()); + final PolicyDecoderCsarHpa policyDecoderCsarHpa = new PolicyDecoderCsarHpa(); + policyDecoderCsarHpa.configure(PolicyDecoderCsarHpaParameters.class.getSimpleName()); - final Collection<ToscaServiceTemplate> entities = policyDecoderCsarPdpx.decode(csar); + final Collection<ToscaServiceTemplate> entities = policyDecoderCsarHpa.decode(csar); assertEquals(2, entities.size()); final ToscaServiceTemplate entity = entities.iterator().next(); ToscaTopologyTemplate topologyTemplate = entity.getToscaTopologyTemplate(); Map<String, ToscaPolicy> map = topologyTemplate.getPolicies().get(0); - ToscaPolicy policy = map.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_HPA_OOF); + ToscaPolicy policy = map.get(PolicyDecoderCsarHpa.TOSCA_POLICY_HPA_OOF); Map<String, Object> props = policy.getProperties(); Object flavorFeatures = - props.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_FLAVORFEATURES); + props.get(PolicyDecoderCsarHpa.TOSCA_POLICY_FLAVORFEATURES); String features = encoder.encode(flavorFeatures); assertTrue(features.contains("\"id\":\"VDU_vgw_0\"")); assertTrue(features.contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); @@ -179,18 +176,18 @@ public class TestPolicyDecoderCsarPdpxLifecycleApi { @Test public void testHpaPolicyHugePage() throws IOException, PolicyDecodingException, CoderException { final Csar csar = new Csar("src/test/resources/hpaPolicyHugePage.csar"); - final PolicyDecoderCsarPdpxLifecycleApi policyDecoderCsarPdpx = new PolicyDecoderCsarPdpxLifecycleApi(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxLifecycleApiParameters.class.getSimpleName()); + final PolicyDecoderCsarHpa policyDecoderCsarHpa = new PolicyDecoderCsarHpa(); + policyDecoderCsarHpa.configure(PolicyDecoderCsarHpaParameters.class.getSimpleName()); - final Collection<ToscaServiceTemplate> entities = policyDecoderCsarPdpx.decode(csar); + final Collection<ToscaServiceTemplate> entities = policyDecoderCsarHpa.decode(csar); assertEquals(2, entities.size()); final ToscaServiceTemplate entity = entities.iterator().next(); ToscaTopologyTemplate topologyTemplate = entity.getToscaTopologyTemplate(); Map<String, ToscaPolicy> map = topologyTemplate.getPolicies().get(0); - ToscaPolicy policy = map.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_HPA_OOF); + ToscaPolicy policy = map.get(PolicyDecoderCsarHpa.TOSCA_POLICY_HPA_OOF); Map<String, Object> props = policy.getProperties(); Object flavorFeatures = - props.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_FLAVORFEATURES); + props.get(PolicyDecoderCsarHpa.TOSCA_POLICY_FLAVORFEATURES); String features = encoder.encode(flavorFeatures); assertTrue(features.contains("\"id\":\"VDU_vgw_0\"")); assertTrue(features.contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); @@ -210,18 +207,18 @@ public class TestPolicyDecoderCsarPdpxLifecycleApi { @Test public void testS3p0PciVendorId() throws IOException, PolicyDecodingException, CoderException { final Csar csar = new Csar("src/test/resources/s3p_0_pciVendorId.csar"); - final PolicyDecoderCsarPdpxLifecycleApi policyDecoderCsarPdpx = new PolicyDecoderCsarPdpxLifecycleApi(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxLifecycleApiParameters.class.getSimpleName()); + final PolicyDecoderCsarHpa policyDecoderCsarHpa = new PolicyDecoderCsarHpa(); + policyDecoderCsarHpa.configure(PolicyDecoderCsarHpaParameters.class.getSimpleName()); - final Collection<ToscaServiceTemplate> entities = policyDecoderCsarPdpx.decode(csar); + final Collection<ToscaServiceTemplate> entities = policyDecoderCsarHpa.decode(csar); assertEquals(1, entities.size()); final ToscaServiceTemplate entity = entities.iterator().next(); ToscaTopologyTemplate topologyTemplate = entity.getToscaTopologyTemplate(); Map<String, ToscaPolicy> map = topologyTemplate.getPolicies().get(0); - ToscaPolicy policy = map.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_HPA_OOF); + ToscaPolicy policy = map.get(PolicyDecoderCsarHpa.TOSCA_POLICY_HPA_OOF); Map<String, Object> props = policy.getProperties(); Object flavorFeatures = - props.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_FLAVORFEATURES); + props.get(PolicyDecoderCsarHpa.TOSCA_POLICY_FLAVORFEATURES); String features = encoder.encode(flavorFeatures); assertTrue(features.contains("\"id\":\"VDU_vgw_0\"")); assertTrue(features.contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); @@ -241,18 +238,18 @@ public class TestPolicyDecoderCsarPdpxLifecycleApi { @Test public void testserviceVcpeWithAll() throws IOException, PolicyDecodingException, CoderException { final Csar csar = new Csar("src/test/resources/service-VcpeWithAll-csar.csar"); - final PolicyDecoderCsarPdpxLifecycleApi policyDecoderCsarPdpx = new PolicyDecoderCsarPdpxLifecycleApi(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxLifecycleApiParameters.class.getSimpleName()); + final PolicyDecoderCsarHpa policyDecoderCsarHpa = new PolicyDecoderCsarHpa(); + policyDecoderCsarHpa.configure(PolicyDecoderCsarHpaParameters.class.getSimpleName()); - final Collection<ToscaServiceTemplate> entities = policyDecoderCsarPdpx.decode(csar); + final Collection<ToscaServiceTemplate> entities = policyDecoderCsarHpa.decode(csar); assertEquals(5, entities.size()); final ToscaServiceTemplate entity = entities.iterator().next(); ToscaTopologyTemplate topologyTemplate = entity.getToscaTopologyTemplate(); Map<String, ToscaPolicy> map = topologyTemplate.getPolicies().get(0); - ToscaPolicy policy = map.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_HPA_OOF); + ToscaPolicy policy = map.get(PolicyDecoderCsarHpa.TOSCA_POLICY_HPA_OOF); Map<String, Object> props = policy.getProperties(); Object flavorFeatures = - props.get(PolicyDecoderCsarPdpxLifecycleApi.TOSCA_POLICY_FLAVORFEATURES); + props.get(PolicyDecoderCsarHpa.TOSCA_POLICY_FLAVORFEATURES); String features = encoder.encode(flavorFeatures); assertTrue(features.contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); assertTrue(features.contains("\"type\":\"flavor_directives\"")); diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxLifecycleApiParameters.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestPolicyDecoderCsarHpaParameters.java index 47971ad3..1ca9e1a1 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxLifecycleApiParameters.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/hpa/TestPolicyDecoderCsarHpaParameters.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.policy.distribution.reception.decoding.pdpx; +package org.onap.policy.distribution.reception.decoding.hpa; import static org.junit.Assert.assertEquals; @@ -26,17 +26,17 @@ import org.junit.Test; import org.onap.policy.common.parameters.ValidationStatus; /** - * Class to perform unit test of {@link PolicyDecoderCsarPdpxLifecycleApiParameters}. + * Class to perform unit test of {@link PolicyDecoderCsarHpaParameters}. */ -public class TestPolicyDecoderCsarPdpxLifecycleApiParameters { +public class TestPolicyDecoderCsarHpaParameters { @Test public void testValidParameters() { - final PolicyDecoderCsarPdpxLifecycleApiParameters parameterGroup = CommonTestData.getPolicyDecoderParameters( - "src/test/resources/parameters/PdpxPolicyDecoderParameters.json", - PolicyDecoderCsarPdpxLifecycleApiParameters.class); + final PolicyDecoderCsarHpaParameters parameterGroup = CommonTestData.getPolicyDecoderParameters( + "src/test/resources/parameters/HpaPolicyDecoderParameters.json", + PolicyDecoderCsarHpaParameters.class); - assertEquals(PolicyDecoderCsarPdpxLifecycleApiParameters.class.getSimpleName(), parameterGroup.getName()); + assertEquals(PolicyDecoderCsarHpaParameters.class.getSimpleName(), parameterGroup.getName()); assertEquals("onapName", parameterGroup.getOnapName()); assertEquals("OOF", parameterGroup.getPolicyNamePrefix()); assertEquals("5", parameterGroup.getPriority()); @@ -48,18 +48,18 @@ public class TestPolicyDecoderCsarPdpxLifecycleApiParameters { @Test public void testInvalidParameters() { - final PolicyDecoderCsarPdpxLifecycleApiParameters parameterGroup = CommonTestData.getPolicyDecoderParameters( - "src/test/resources/parameters/PdpxPolicyDecoderParametersInvalid.json", - PolicyDecoderCsarPdpxLifecycleApiParameters.class); + final PolicyDecoderCsarHpaParameters parameterGroup = CommonTestData.getPolicyDecoderParameters( + "src/test/resources/parameters/HpaPolicyDecoderParametersInvalid.json", + PolicyDecoderCsarHpaParameters.class); assertEquals(ValidationStatus.INVALID, parameterGroup.validate().getStatus()); } @Test public void testEmptyParameters() { - final PolicyDecoderCsarPdpxLifecycleApiParameters configurationParameters = + final PolicyDecoderCsarHpaParameters configurationParameters = CommonTestData.getPolicyDecoderParameters("src/test/resources/parameters/EmptyParameters.json", - PolicyDecoderCsarPdpxLifecycleApiParameters.class); + PolicyDecoderCsarHpaParameters.class); assertEquals(ValidationStatus.INVALID, configurationParameters.validate().getStatus()); } diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpx.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpx.java deleted file mode 100644 index 0eac8bf6..00000000 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpx.java +++ /dev/null @@ -1,278 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Intel. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.distribution.reception.decoding.pdpx; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.util.Collection; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.onap.policy.common.parameters.ParameterGroup; -import org.onap.policy.common.parameters.ParameterService; -import org.onap.policy.distribution.model.Csar; -import org.onap.policy.distribution.model.OptimizationPolicy; -import org.onap.policy.distribution.reception.decoding.PolicyDecodingException; - -/** - * Class to perform unit test of {@link PolicyDecoderCsarPdpx}. - * - */ -public class TestPolicyDecoderCsarPdpx { - - /** - * Set up for test cases. - */ - @BeforeClass - public static void setUp() { - final ParameterGroup parameterGroup = CommonTestData.getPolicyDecoderParameters( - "src/test/resources/parameters/PdpxPolicyDecoderParameters.json", - PolicyDecoderCsarPdpxConfigurationParameterGroup.class); - parameterGroup.setName(PolicyDecoderCsarPdpxConfigurationParameterGroup.class.getSimpleName()); - ParameterService.register(parameterGroup); - } - - /** - * Tear down. - */ - @AfterClass - public static void tearDown() { - ParameterService.deregister(PolicyDecoderCsarPdpxConfigurationParameterGroup.class.getSimpleName()); - } - - @Test - public void testHpaPolicy2Vnf() throws IOException, PolicyDecodingException { - final Csar csar = new Csar("src/test/resources/service-TestNs8-csar.csar"); - final PolicyDecoderCsarPdpx policyDecoderCsarPdpx = new PolicyDecoderCsarPdpx(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxConfigurationParameterGroup.class.getSimpleName()); - - final Collection<OptimizationPolicy> ret = policyDecoderCsarPdpx.decode(csar); - - assertEquals(2, ret.size()); - final OptimizationPolicy policy = (OptimizationPolicy) ret.toArray()[0]; - - assertEquals("onapName", policy.getOnapName()); - assertTrue(policy.getName().startsWith("OOF.")); - assertTrue(policy.getConfigBody().contains("\"priority\":\"5\"")); - assertTrue(policy.getConfigBody().contains("\"riskLevel\":\"2\"")); - assertTrue(policy.getConfigBody().contains("\"riskType\":\"Test\"")); - assertTrue(policy.getConfigBody().contains("\"version\":\"1.0\"")); - assertTrue(policy.getConfigBody().contains("\"policyType\":\"hpa\"")); - - assertTrue(policy.getConfigBody().contains("\"id\":\"VDU_vgw_0\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"flavor_directives\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-feature\":\"basicCapabilities\"")); - assertTrue(policy.getConfigBody().contains("\"mandatory\":\"True\"")); - assertTrue(policy.getConfigBody().contains("\"architecture\":\"generic\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-version\":\"v1\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"virtualMemSize\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"MB\"")); - } - - @Test - public void testHpaPolicySriov() throws IOException, PolicyDecodingException { - final Csar csar = new Csar("src/test/resources/hpaPolicySriov.csar"); - final PolicyDecoderCsarPdpx policyDecoderCsarPdpx = new PolicyDecoderCsarPdpx(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxConfigurationParameterGroup.class.getSimpleName()); - - final Collection<OptimizationPolicy> policies = policyDecoderCsarPdpx.decode(csar); - final OptimizationPolicy policy = (OptimizationPolicy) policies.toArray()[0]; - - assertEquals("onapName", policy.getOnapName()); - assertTrue(policy.getName().startsWith("OOF.")); - assertTrue(policy.getConfigBody().contains("\"priority\":\"5\"")); - assertTrue(policy.getConfigBody().contains("\"riskLevel\":\"2\"")); - assertTrue(policy.getConfigBody().contains("\"riskType\":\"Test\"")); - assertTrue(policy.getConfigBody().contains("\"version\":\"1.0\"")); - assertTrue(policy.getConfigBody().contains("\"policyType\":\"hpa\"")); - - assertTrue(policy.getConfigBody().contains("\"id\":\"VDU_vgw_0\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"flavor_directives\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_name\":\"flavorName\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_value\":\"\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-feature\":\"sriovNICNetwork\"")); - assertTrue(policy.getConfigBody().contains("\"mandatory\":\"True\"")); - assertTrue(policy.getConfigBody().contains("\"architecture\":\"generic\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-version\":\"v1\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"pciVendorId\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-value\":\"1234\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"pciDeviceId\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-value\":\"5678\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"pciNumDevices\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-value\":\"1\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"\"")); - } - - @Test - public void testHpaPolicyPciePassthrough() throws IOException, PolicyDecodingException { - final Csar csar = new Csar("src/test/resources/hpaPolicyPciePassthrough.csar"); - final PolicyDecoderCsarPdpx policyDecoderCsarPdpx = new PolicyDecoderCsarPdpx(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxConfigurationParameterGroup.class.getSimpleName()); - - final Collection<OptimizationPolicy> policies = policyDecoderCsarPdpx.decode(csar); - assertEquals(2, policies.size()); - final OptimizationPolicy policy = (OptimizationPolicy) policies.toArray()[0]; - - assertEquals("onapName", policy.getOnapName()); - assertTrue(policy.getName().startsWith("OOF.")); - assertTrue(policy.getConfigBody().contains("\"priority\":\"5\"")); - assertTrue(policy.getConfigBody().contains("\"riskLevel\":\"2\"")); - assertTrue(policy.getConfigBody().contains("\"riskType\":\"Test\"")); - assertTrue(policy.getConfigBody().contains("\"version\":\"1.0\"")); - assertTrue(policy.getConfigBody().contains("\"policyType\":\"hpa\"")); - - assertTrue(policy.getConfigBody().contains("\"id\":\"VDU_vgw_0\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"flavor_directives\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_name\":\"flavorName\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_value\":\"\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-feature\":\"pciePassthrough\"")); - assertTrue(policy.getConfigBody().contains("\"mandatory\":\"True\"")); - assertTrue(policy.getConfigBody().contains("\"architecture\":\"generic\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-version\":\"v1\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"pciVendorId\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-value\":\"1234\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"pciDeviceId\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-value\":\"5678\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"pciNumDevices\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-value\":\"1\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"\"")); - - - } - - @Test - public void testHpaPolicyHugePage() throws IOException, PolicyDecodingException { - final Csar csar = new Csar("src/test/resources/hpaPolicyHugePage.csar"); - final PolicyDecoderCsarPdpx policyDecoderCsarPdpx = new PolicyDecoderCsarPdpx(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxConfigurationParameterGroup.class.getSimpleName()); - - final Collection<OptimizationPolicy> policies = policyDecoderCsarPdpx.decode(csar); - assertEquals(2, policies.size()); - final OptimizationPolicy policy = (OptimizationPolicy) policies.toArray()[0]; - - assertEquals("onapName", policy.getOnapName()); - assertTrue(policy.getName().startsWith("OOF.")); - assertTrue(policy.getConfigBody().contains("\"priority\":\"5\"")); - assertTrue(policy.getConfigBody().contains("\"riskLevel\":\"2\"")); - assertTrue(policy.getConfigBody().contains("\"riskType\":\"Test\"")); - assertTrue(policy.getConfigBody().contains("\"version\":\"1.0\"")); - assertTrue(policy.getConfigBody().contains("\"policyType\":\"hpa\"")); - - assertTrue(policy.getConfigBody().contains("\"id\":\"VDU_vgw_0\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"flavor_directives\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_name\":\"flavorName\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_value\":\"\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-feature\":\"hugePages\"")); - assertTrue(policy.getConfigBody().contains("\"mandatory\":\"true\"")); - assertTrue(policy.getConfigBody().contains("\"architecture\":\"generic\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-version\":\"v1\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"memoryPageSize\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-value\":\"2\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"MB\"")); - } - - @Test - public void testS3p0PciVendorId() throws IOException, PolicyDecodingException { - final Csar csar = new Csar("src/test/resources/s3p_0_pciVendorId.csar"); - final PolicyDecoderCsarPdpx policyDecoderCsarPdpx = new PolicyDecoderCsarPdpx(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxConfigurationParameterGroup.class.getSimpleName()); - - final Collection<OptimizationPolicy> policies = policyDecoderCsarPdpx.decode(csar); - assertEquals(1, policies.size()); - final OptimizationPolicy policy = (OptimizationPolicy) policies.toArray()[0]; - - assertEquals("onapName", policy.getOnapName()); - assertTrue(policy.getName().startsWith("OOF.")); - assertTrue(policy.getConfigBody().contains("\"priority\":\"5\"")); - assertTrue(policy.getConfigBody().contains("\"riskLevel\":\"2\"")); - assertTrue(policy.getConfigBody().contains("\"riskType\":\"Test\"")); - assertTrue(policy.getConfigBody().contains("\"version\":\"1.0\"")); - assertTrue(policy.getConfigBody().contains("\"policyType\":\"hpa\"")); - - assertTrue(policy.getConfigBody().contains("\"id\":\"VDU_vgw_0\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"flavor_directives\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_name\":\"flavorName\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_value\":\"\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-feature\":\"pciePassthrough\"")); - assertTrue(policy.getConfigBody().contains("\"mandatory\":\"True\"")); - assertTrue(policy.getConfigBody().contains("\"architecture\":\"generic\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-version\":\"v1\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"pciVendorId\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-value\":\"1234\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"\"")); - - } - - @Test - public void testserviceVcpeWithAll() throws IOException, PolicyDecodingException { - final Csar csar = new Csar("src/test/resources/service-VcpeWithAll-csar.csar"); - final PolicyDecoderCsarPdpx policyDecoderCsarPdpx = new PolicyDecoderCsarPdpx(); - policyDecoderCsarPdpx.configure(PolicyDecoderCsarPdpxConfigurationParameterGroup.class.getSimpleName()); - - final Collection<OptimizationPolicy> policies = policyDecoderCsarPdpx.decode(csar); - assertEquals(5, policies.size()); - final OptimizationPolicy policy = (OptimizationPolicy) policies.toArray()[0]; - - assertEquals("onapName", policy.getOnapName()); - assertTrue(policy.getName().startsWith("OOF.")); - assertTrue(policy.getConfigBody().contains("\"priority\":\"5\"")); - assertTrue(policy.getConfigBody().contains("\"riskLevel\":\"2\"")); - assertTrue(policy.getConfigBody().contains("\"riskType\":\"Test\"")); - assertTrue(policy.getConfigBody().contains("\"version\":\"1.0\"")); - assertTrue(policy.getConfigBody().contains("\"policyType\":\"hpa\"")); - - assertTrue(policy.getConfigBody().contains("\"type\":\"tosca.nodes.nfv.Vdu.Compute\"")); - assertTrue(policy.getConfigBody().contains("\"type\":\"flavor_directives\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_name\":\"flavorName\"")); - assertTrue(policy.getConfigBody().contains("\"attribute_value\":\"\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-feature\":\"sriovNICNetwork\"")); - assertTrue(policy.getConfigBody().contains("\"mandatory\":\"True\"")); - assertTrue(policy.getConfigBody().contains("\"architecture\":\"generic\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-version\":\"v1\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-key\":\"pciVendorId\"")); - assertTrue(policy.getConfigBody().contains("\"hpa-attribute-value\":\"1234\"")); - assertTrue(policy.getConfigBody().contains("\"operator\":\"=\"")); - assertTrue(policy.getConfigBody().contains("\"unit\":\"\"")); - - } -} diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxConfigurationParameterGroup.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxConfigurationParameterGroup.java deleted file mode 100644 index d0de432a..00000000 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/pdpx/TestPolicyDecoderCsarPdpxConfigurationParameterGroup.java +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.distribution.reception.decoding.pdpx; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; -import org.onap.policy.common.parameters.ValidationStatus; - -/** - * Class to perform unit test of {@link PolicyDecoderCsarPdpxConfigurationParameterGroup}. - * - * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com) - */ -public class TestPolicyDecoderCsarPdpxConfigurationParameterGroup { - - @Test - public void testValidParameters() { - final PolicyDecoderCsarPdpxConfigurationParameterGroup parameterGroup = CommonTestData - .getPolicyDecoderParameters("src/test/resources/parameters/PdpxPolicyDecoderParameters.json", - PolicyDecoderCsarPdpxConfigurationParameterGroup.class); - - assertEquals(PolicyDecoderCsarPdpxConfigurationParameterGroup.class.getSimpleName(), parameterGroup.getName()); - assertEquals("onapName", parameterGroup.getOnapName()); - assertEquals("OOF", parameterGroup.getPolicyNamePrefix()); - assertEquals("5", parameterGroup.getPriority()); - assertEquals("2", parameterGroup.getRiskLevel()); - assertEquals("Test", parameterGroup.getRiskType()); - assertEquals("1.0", parameterGroup.getVersion()); - assertEquals(ValidationStatus.CLEAN, parameterGroup.validate().getStatus()); - } - - @Test - public void testInvalidParameters() { - final PolicyDecoderCsarPdpxConfigurationParameterGroup parameterGroup = CommonTestData - .getPolicyDecoderParameters("src/test/resources/parameters/PdpxPolicyDecoderParametersInvalid.json", - PolicyDecoderCsarPdpxConfigurationParameterGroup.class); - - assertEquals(ValidationStatus.INVALID, parameterGroup.validate().getStatus()); - } - - @Test - public void testEmptyParameters() { - final PolicyDecoderCsarPdpxConfigurationParameterGroup configurationParameters = - CommonTestData.getPolicyDecoderParameters("src/test/resources/parameters/EmptyParameters.json", - PolicyDecoderCsarPdpxConfigurationParameterGroup.class); - - assertEquals(ValidationStatus.INVALID, configurationParameters.validate().getStatus()); - } -} diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicyParameterGroupTest.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicyParameterGroupTest.java index 56ddc406..c3e69037 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicyParameterGroupTest.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicyParameterGroupTest.java @@ -25,7 +25,7 @@ import static org.junit.Assert.assertEquals; import org.junit.Test; import org.onap.policy.common.parameters.ValidationStatus; -import org.onap.policy.distribution.reception.decoding.pdpx.CommonTestData; +import org.onap.policy.distribution.reception.decoding.hpa.CommonTestData; /** * Class to perform unit test of {@link PolicyDecoderFileInCsarToPolicyParameterGroup}. diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicyTest.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicyTest.java index 451e4f1b..d619671f 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicyTest.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/decoding/policy/file/PolicyDecoderFileInCsarToPolicyTest.java @@ -37,7 +37,7 @@ import org.mockito.runners.MockitoJUnitRunner; import org.onap.policy.common.parameters.ParameterService; import org.onap.policy.common.utils.coder.CoderException; import org.onap.policy.distribution.model.Csar; -import org.onap.policy.distribution.reception.decoding.pdpx.CommonTestData; +import org.onap.policy.distribution.reception.decoding.hpa.CommonTestData; import org.onap.policy.models.tosca.authorative.concepts.ToscaEntity; /** diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java index 30bcdf11..f5845de8 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java @@ -36,7 +36,7 @@ import java.util.Arrays; import org.junit.Test; import org.onap.policy.common.parameters.GroupValidationResult; import org.onap.policy.common.parameters.ValidationStatus; -import org.onap.policy.distribution.reception.decoding.pdpx.CommonTestData; +import org.onap.policy.distribution.reception.decoding.hpa.CommonTestData; /** * Class to perform unit test of {@link SdcConfiguration}. |