diff options
author | 2023-04-27 15:22:50 +0100 | |
---|---|---|
committer | 2023-05-03 16:48:44 +0100 | |
commit | 5c921c62ef5fd97ae86efe28e932619546966907 (patch) | |
tree | a8fa5a2ad5c52f41e12e43750aee7ff026e245bf /participant/participant-intermediary/src/test | |
parent | b619e00e3dbb4c7e2d5a484be8cae4db29afe149 (diff) |
Add participant properties capability to acm/participants
Add statusProperties support in acm acm/participants.
Issue-ID: POLICY-4652
Change-Id: I6dd37c9be58fce36def022364abe46c791e98a77
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-intermediary/src/test')
-rw-r--r-- | participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/api/impl/AutomationCompositionElementListenerTest.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/api/impl/AutomationCompositionElementListenerTest.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/api/impl/AutomationCompositionElementListenerTest.java new file mode 100644 index 000000000..6255b886c --- /dev/null +++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/api/impl/AutomationCompositionElementListenerTest.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2023 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.clamp.acm.participant.intermediary.api.impl; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatCode; + +import java.util.UUID; +import org.junit.jupiter.api.Test; +import org.onap.policy.clamp.acm.participant.intermediary.handler.DummyAcElementListener; +import org.onap.policy.models.base.PfModelException; + +class AutomationCompositionElementListenerTest { + + @Test + void defaultTest() throws PfModelException { + var listener = new DummyAcElementListener(); + assertThat(listener.getStatusProperties(UUID.randomUUID(), UUID.randomUUID())).isNotNull().isEmpty(); + assertThat(listener.getOperationalState(UUID.randomUUID(), UUID.randomUUID())).isNotNull().isEmpty(); + assertThat(listener.getUseState(UUID.randomUUID(), UUID.randomUUID())).isNotNull().isEmpty(); + assertThatCode(() -> listener.lock(UUID.randomUUID(), UUID.randomUUID())).doesNotThrowAnyException(); + assertThatCode(() -> listener.unlock(UUID.randomUUID(), UUID.randomUUID())).doesNotThrowAnyException(); + } +} |