aboutsummaryrefslogtreecommitdiffstats
path: root/runtime-acm/src/test
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2023-04-05 16:32:38 +0100
committerFrancescoFioraEst <francesco.fiora@est.tech>2023-04-11 10:06:21 +0100
commit9f1fdf9f419c1724a9cf75a20fdd24df191766bd (patch)
tree16db3d01d45ae45a4fc776d9d23596ec2c6bcc58 /runtime-acm/src/test
parent2ca7552978f5389ef5ed2e5d4be3cb43e446f7c6 (diff)
Add UseState and OperationalState support in ACM
Issue-ID: POLICY-4639 Change-Id: Iac5249c054bf41d830463826a8f61f477c48235b Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'runtime-acm/src/test')
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionAcHandlerTest.java4
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java10
2 files changed, 9 insertions, 5 deletions
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionAcHandlerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionAcHandlerTest.java
index 153f7a0e0..c44fa1d21 100644
--- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionAcHandlerTest.java
+++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionAcHandlerTest.java
@@ -64,7 +64,7 @@ class SupervisionAcHandlerTest {
var automationCompositionAckMessage =
new AutomationCompositionDeployAck(ParticipantMessageType.AUTOMATION_COMPOSITION_STATECHANGE_ACK);
for (var elementEntry : automationComposition.getElements().entrySet()) {
- var acElementDeployAck = new AcElementDeployAck(DeployState.DEPLOYED, LockState.UNLOCKED, true, "");
+ var acElementDeployAck = new AcElementDeployAck(DeployState.DEPLOYED, LockState.UNLOCKED, "", "", true, "");
automationCompositionAckMessage.getAutomationCompositionResultMap().put(elementEntry.getKey(),
acElementDeployAck);
}
@@ -86,7 +86,7 @@ class SupervisionAcHandlerTest {
var automationCompositionAckMessage =
new AutomationCompositionDeployAck(ParticipantMessageType.AUTOMATION_COMPOSITION_DEPLOY_ACK);
for (var elementEntry : automationComposition.getElements().entrySet()) {
- var acElementDeployAck = new AcElementDeployAck(DeployState.DEPLOYED, LockState.LOCKED, true, "");
+ var acElementDeployAck = new AcElementDeployAck(DeployState.DEPLOYED, LockState.LOCKED, "", "", true, "");
automationCompositionAckMessage
.setAutomationCompositionResultMap(Map.of(elementEntry.getKey(), acElementDeployAck));
}
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java
index fb12e040a..f00747c6b 100644
--- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java
+++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java
@@ -38,6 +38,7 @@ import org.onap.policy.clamp.models.acm.concepts.ParticipantSupportedElementType
import org.onap.policy.clamp.models.acm.messages.dmaap.participant.ParticipantDeregister;
import org.onap.policy.clamp.models.acm.messages.dmaap.participant.ParticipantRegister;
import org.onap.policy.clamp.models.acm.messages.dmaap.participant.ParticipantStatus;
+import org.onap.policy.clamp.models.acm.persistence.provider.AutomationCompositionProvider;
import org.onap.policy.clamp.models.acm.persistence.provider.ParticipantProvider;
class SupervisionParticipantHandlerTest {
@@ -54,7 +55,8 @@ class SupervisionParticipantHandlerTest {
participantDeregisterMessage.setParticipantId(CommonTestData.getParticipantId());
var participantDeregisterAckPublisher = mock(ParticipantDeregisterAckPublisher.class);
var handler = new SupervisionParticipantHandler(participantProvider,
- mock(ParticipantRegisterAckPublisher.class), participantDeregisterAckPublisher);
+ mock(ParticipantRegisterAckPublisher.class), participantDeregisterAckPublisher,
+ mock(AutomationCompositionProvider.class));
handler.handleParticipantMessage(participantDeregisterMessage);
@@ -76,7 +78,8 @@ class SupervisionParticipantHandlerTest {
var participantProvider = mock(ParticipantProvider.class);
var participantRegisterAckPublisher = mock(ParticipantRegisterAckPublisher.class);
var handler = new SupervisionParticipantHandler(participantProvider, participantRegisterAckPublisher,
- mock(ParticipantDeregisterAckPublisher.class));
+ mock(ParticipantDeregisterAckPublisher.class),
+ mock(AutomationCompositionProvider.class));
handler.handleParticipantMessage(participantRegisterMessage);
verify(participantProvider).saveParticipant(any());
@@ -97,7 +100,8 @@ class SupervisionParticipantHandlerTest {
var participantProvider = mock(ParticipantProvider.class);
var handler = new SupervisionParticipantHandler(participantProvider,
- mock(ParticipantRegisterAckPublisher.class), mock(ParticipantDeregisterAckPublisher.class));
+ mock(ParticipantRegisterAckPublisher.class), mock(ParticipantDeregisterAckPublisher.class),
+ mock(AutomationCompositionProvider.class));
var participant = CommonTestData.createParticipant(CommonTestData.getParticipantId());
when(participantProvider.findParticipant(CommonTestData.getParticipantId()))
.thenReturn(Optional.of(participant));