diff options
author | saul.gill <saul.gill@est.tech> | 2023-01-13 17:24:23 +0000 |
---|---|---|
committer | saul.gill <saul.gill@est.tech> | 2023-01-19 13:07:33 +0000 |
commit | 46964ab900060a560b9b41f7d34ab0e26ac7fd61 (patch) | |
tree | d4d15350f492cc19ee657df6cb926349bd724919 /runtime-acm/src/test/java | |
parent | 48df549e1fd90c2768a78c0c88e87dc3834b6222 (diff) |
Add supported ac elements to participants
Added new supported elements table
Added supported element names and versions
to participant application.yaml files
Issue-ID: POLICY-4512
Change-Id: I97d7f571f2906846514ac0804b4827f0601177d7
Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'runtime-acm/src/test/java')
-rw-r--r-- | runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java | 7 |
1 files changed, 6 insertions, 1 deletions
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 f7c18b67b..05e356b55 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 @@ -25,6 +25,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import java.util.ArrayList; import java.util.Optional; import java.util.UUID; import org.junit.jupiter.api.Test; @@ -82,6 +83,7 @@ class SupervisionParticipantHandlerTest { var participantRegisterAckPublisher = mock(ParticipantRegisterAckPublisher.class); var handler = new SupervisionParticipantHandler(participantProvider, participantRegisterAckPublisher, mock(ParticipantDeregisterAckPublisher.class)); + participantRegisterMessage.setParticipantSupportedElementType(new ArrayList<>()); handler.handleParticipantMessage(participantRegisterMessage); @@ -96,12 +98,15 @@ class SupervisionParticipantHandlerTest { participantStatusMessage.setParticipantId(PARTICIPANT_ID); participantStatusMessage.setParticipantType(PARTICIPANT_TYPE); participantStatusMessage.setState(ParticipantState.ON_LINE); + participantStatusMessage.setParticipantSupportedElementType(new ArrayList<>()); var participantProvider = mock(ParticipantProvider.class); var handler = new SupervisionParticipantHandler(participantProvider, mock(ParticipantRegisterAckPublisher.class), mock(ParticipantDeregisterAckPublisher.class)); + var participant = new Participant(); + when(participantProvider.findParticipant(PARTICIPANT_ID)).thenReturn(Optional.of(participant)); handler.handleParticipantMessage(participantStatusMessage); - verify(participantProvider).saveParticipant(any()); + verify(participantProvider).updateParticipant(any()); } } |