aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-policy/src/test/java
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2023-05-10 17:11:04 +0100
committerFrancescoFioraEst <francesco.fiora@est.tech>2023-05-16 08:19:07 +0100
commit722523f568a682f1e48f6998c24c945802fec782 (patch)
treeffe6e47aa4c339023772a15d816af8b509b8142e /participant/participant-impl/participant-impl-policy/src/test/java
parentb4b9a1f3c81a1c64271e38d879a84f6b134d3a54 (diff)
Add participant capability to send message with status and properties
Add participant capability to send message with status and properties to ACM-R when those values need to be change. Issue-ID: POLICY-4679 Change-Id: Idca5796c199b235e1f829097316c50688a351e80 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-impl/participant-impl-policy/src/test/java')
-rw-r--r--participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java25
1 files changed, 2 insertions, 23 deletions
diff --git a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java
index ecc0b88e7..d3b27ae10 100644
--- a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java
+++ b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java
@@ -21,7 +21,6 @@
package org.onap.policy.clamp.acm.participant.policy.main.handler;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
@@ -37,7 +36,6 @@ import org.onap.policy.clamp.acm.participant.policy.client.PolicyApiHttpClient;
import org.onap.policy.clamp.acm.participant.policy.client.PolicyPapHttpClient;
import org.onap.policy.clamp.models.acm.concepts.AcElementDeploy;
import org.onap.policy.clamp.models.acm.concepts.DeployState;
-import org.onap.policy.clamp.models.acm.concepts.LockState;
import org.onap.policy.clamp.models.acm.messages.rest.instantiation.DeployOrder;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
@@ -63,7 +61,7 @@ class AutomationCompositionElementHandlerTest {
handler.undeploy(AC_ID, automationCompositionElementId);
verify(intermediaryApi).updateAutomationCompositionElementState(AC_ID, automationCompositionElementId,
- DeployState.UNDEPLOYED, LockState.NONE);
+ DeployState.UNDEPLOYED, null, "Undeployed");
}
private AcElementDeploy getTestingAcElement() {
@@ -94,9 +92,8 @@ class AutomationCompositionElementHandlerTest {
handler.setIntermediaryApi(intermediaryApi);
handler.deploy(AC_ID, getTestingAcElement(), Map.of());
- handler.undeploy(AC_ID, automationCompositionElementId);
verify(intermediaryApi).updateAutomationCompositionElementState(AC_ID, automationCompositionElementId,
- DeployState.UNDEPLOYED, LockState.NONE);
+ DeployState.DEPLOYED, null, "Deployed");
}
@Test
@@ -134,22 +131,4 @@ class AutomationCompositionElementHandlerTest {
assertThatThrownBy(() -> handler.deploy(AC_ID, element, Map.of()))
.hasMessageMatching("Deploy of Policy failed.");
}
-
- @Test
- void testGetOperationalState() throws PfModelException {
- var api = mock(PolicyApiHttpClient.class);
- var pap = mock(PolicyPapHttpClient.class);
- var handler = new AutomationCompositionElementHandler(api, pap);
-
- assertEquals("ENABLED", handler.getOperationalState(UUID.randomUUID(), UUID.randomUUID()));
- }
-
- @Test
- void testGetUseState() throws PfModelException {
- var api = mock(PolicyApiHttpClient.class);
- var pap = mock(PolicyPapHttpClient.class);
- var handler = new AutomationCompositionElementHandler(api, pap);
-
- assertEquals("IDLE", handler.getUseState(UUID.randomUUID(), UUID.randomUUID()));
- }
}