summaryrefslogtreecommitdiffstats
path: root/models/src/test/java/org/onap
diff options
context:
space:
mode:
authorSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-09-20 16:08:25 +0100
committerSirisha_Manchikanti <sirisha.manchikanti@est.tech>2021-09-22 14:07:56 +0100
commit9b982666d6ddb6c964a1e539fea97231b5053f5b (patch)
treed3e5d8959002f73c420946e7553bb4fb0aae02b7 /models/src/test/java/org/onap
parentb428105b44d0504b05a0b93894bef97e5ab7e8b4 (diff)
Add participantType to participant class
Add participantType to participant class, cascade common and instance properties from runtime to participants Issue-ID: POLICY-3576 Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech> Change-Id: Ic9205aafe269ccc6dae0b3463fc6df5c47129e5d
Diffstat (limited to 'models/src/test/java/org/onap')
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java1
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopUpdateTest.java8
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java7
-rw-r--r--models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdateTest.java7
4 files changed, 19 insertions, 4 deletions
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java
index e2eb5154f..087292354 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/concepts/JpaParticipantTest.java
@@ -247,6 +247,7 @@ class JpaParticipantTest {
testParticipant.setName("participant");
testParticipant.setVersion("0.0.1");
testParticipant.setDefinition(new ToscaConceptIdentifier("participantDefinitionName", "0.0.1"));
+ testParticipant.setParticipantType(new ToscaConceptIdentifier("participantTypeName", "0.0.1"));
return testParticipant;
}
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopUpdateTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopUpdateTest.java
index 1b155a12a..ce56d582a 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopUpdateTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ControlLoopUpdateTest.java
@@ -36,6 +36,7 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantUpdates;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaProperty;
/**
* Test the copy constructor.
@@ -62,8 +63,11 @@ class ControlLoopUpdateTest {
clElement.setParticipantId(id);
clElement.setParticipantType(id);
- Map<String, String> commonPropertiesMap = Map.of("Prop1", "PropValue");
- clElement.setCommonPropertiesMap(commonPropertiesMap);
+ ToscaProperty property = new ToscaProperty();
+ property.setName("test");
+ property.setType("testType");
+ Map<String, ToscaProperty> propertiesMap = Map.of("Prop1", property);
+ clElement.setPropertiesMap(propertiesMap);
ParticipantUpdates participantUpdates = new ParticipantUpdates();
participantUpdates.setParticipantId(id);
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java
index f34777a70..b2bce05cc 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantStatusTest.java
@@ -42,6 +42,7 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.models.tosca.authorative.concepts.ToscaNodeTemplate;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaProperty;
class ParticipantStatusTest {
@@ -117,7 +118,11 @@ class ParticipantStatusTest {
ControlLoopElementDefinition clDefinition = new ControlLoopElementDefinition();
clDefinition.setClElementDefinitionId(id);
clDefinition.setControlLoopElementToscaNodeTemplate(toscaNodeTemplate);
- Map<String, String> commonPropertiesMap = Map.of("Prop1", "PropValue");
+
+ ToscaProperty property = new ToscaProperty();
+ property.setName("test");
+ property.setType("testType");
+ Map<String, ToscaProperty> commonPropertiesMap = Map.of("Prop1", property);
clDefinition.setCommonPropertiesMap(commonPropertiesMap);
return clDefinition;
}
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdateTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdateTest.java
index 6fe8604cf..d7023d0c1 100644
--- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdateTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/messages/dmaap/participant/ParticipantUpdateTest.java
@@ -35,6 +35,7 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.models.tosca.authorative.concepts.ToscaNodeTemplate;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaProperty;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
/**
@@ -89,7 +90,11 @@ class ParticipantUpdateTest {
ControlLoopElementDefinition clDefinition = new ControlLoopElementDefinition();
clDefinition.setClElementDefinitionId(id);
clDefinition.setControlLoopElementToscaNodeTemplate(toscaNodeTemplate);
- Map<String, String> commonPropertiesMap = Map.of("Prop1", "PropValue");
+
+ ToscaProperty property = new ToscaProperty();
+ property.setName("test");
+ property.setType("testType");
+ Map<String, ToscaProperty> commonPropertiesMap = Map.of("Prop1", property);
clDefinition.setCommonPropertiesMap(commonPropertiesMap);
return clDefinition;
}