summaryrefslogtreecommitdiffstats
path: root/main/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2021-01-04 13:36:34 +0000
committerliamfallon <liam.fallon@est.tech>2021-01-04 16:11:39 +0000
commit20379d580cd91dfb5d7d945dc46a627445c87aa6 (patch)
treefef024b432eb251dc25e9526bf7119917b0078fd /main/src/test
parent24220a823f9b5516a3bed1c1e8cf51f36ea75efe (diff)
Changed identifiers to concept identifiers
The policy models tosca classes ToscaPolicyIdentifier and ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA concept, not just TOSCA policies so they are renamed to ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion respectively. The class ToscaPolicyTypeIdentifier is redundant and is replaced by ToscaConceptIdentifier. Issue-ID: POLICY-2900 Change-Id: I9ba3deae8eb4a8e51df5a40cdb8be8d9d23c5990 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'main/src/test')
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java
index e71cfc54..e0f3375f 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java
@@ -3,7 +3,7 @@
* ONAP Policy API
* ================================================================================
* Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021 Nordix Foundation.
* Modifications Copyright (C) 2020 Bell Canada.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -54,8 +54,7 @@ import org.onap.policy.models.pdp.enums.PdpState;
import org.onap.policy.models.provider.PolicyModelsProvider;
import org.onap.policy.models.provider.PolicyModelsProviderFactory;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
/**
@@ -180,7 +179,7 @@ public class TestPolicyProvider {
pdpSubGroup.setPdpType("type");
pdpSubGroup.setDesiredInstanceCount(123);
pdpSubGroup.setSupportedPolicyTypes(new ArrayList<>());
- pdpSubGroup.getSupportedPolicyTypes().add(new ToscaPolicyTypeIdentifier(policyTypeId, policyTypeVersion));
+ pdpSubGroup.getSupportedPolicyTypes().add(new ToscaConceptIdentifier(policyTypeId, policyTypeVersion));
pdpGroup.getPdpSubgroups().add(pdpSubGroup);
Pdp pdp = new Pdp();
@@ -215,7 +214,7 @@ public class TestPolicyProvider {
// Update pdpSubGroup
pdpSubGroup.setPolicies(new ArrayList<>());
- pdpSubGroup.getPolicies().add(new ToscaPolicyIdentifier(policyId, policyVersion));
+ pdpSubGroup.getPolicies().add(new ToscaConceptIdentifier(policyId, policyVersion));
assertEquals(1,
databaseProvider.createPdpGroups(groupList).get(0).getPdpSubgroups().get(0).getPolicies().size());