diff options
Diffstat (limited to 'participant/participant-impl/participant-impl-policy/src/test')
-rw-r--r-- | participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/handler/AutomationCompositionElementHandlerTest.java | 25 |
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())); - } } |