diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2023-01-17 09:56:52 +0000 |
---|---|---|
committer | FrancescoFioraEst <francesco.fiora@est.tech> | 2023-01-23 15:22:35 +0000 |
commit | c5e57c1b1cd0e778ebf47edd20fd9a340471ab72 (patch) | |
tree | f567d2bc52cf070bcccb83bad0f4ab5f70d2415f /participant/participant-intermediary/src/test | |
parent | a263a250f7185fd9ddc4b600d96452fdbf21fffb (diff) |
Refactor participantId as UUID
As part of endpoint refactoring, refactor participantId as UUID in ACM.
Issue-ID: POLICY-4521
Change-Id: I8ac652d9b2fadf9ce3220febb9c2c3ac0d3786cc
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/main/parameters/CommonTestData.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/main/parameters/CommonTestData.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/main/parameters/CommonTestData.java index b7d66bec6..45703848e 100644 --- a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/main/parameters/CommonTestData.java +++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/main/parameters/CommonTestData.java @@ -61,8 +61,7 @@ public class CommonTestData { private static final Object lockit = new Object(); public static final UUID AC_ID_0 = UUID.randomUUID(); public static final UUID AC_ID_1 = UUID.randomUUID(); - public static final ToscaConceptIdentifier PARTCICIPANT_ID = - new ToscaConceptIdentifier("org.onap.PM_Policy", "0.0.0"); + public static final UUID PARTCICIPANT_ID = UUID.randomUUID(); /** * Get ParticipantIntermediaryParameters. @@ -155,12 +154,12 @@ public class CommonTestData { * * @return participant Id */ - public static ToscaConceptIdentifier getParticipantId() { + public static UUID getParticipantId() { return PARTCICIPANT_ID; } - public static ToscaConceptIdentifier getRndParticipantId() { - return new ToscaConceptIdentifier("diff", "0.0.0"); + public static UUID getRndParticipantId() { + return UUID.randomUUID(); } public static ToscaConceptIdentifier getDefinition() { @@ -269,7 +268,7 @@ public class CommonTestData { * @return a map suitable for elementsOnThisParticipant */ public Map<UUID, AutomationCompositionElement> setAutomationCompositionElementTest(UUID uuid, - ToscaConceptIdentifier definition, ToscaConceptIdentifier participantId) { + ToscaConceptIdentifier definition, UUID participantId) { var acElement = new AutomationCompositionElement(); acElement.setId(uuid); acElement.setParticipantId(participantId); @@ -289,7 +288,7 @@ public class CommonTestData { * @return a AutomationCompositionHander with elements */ public AutomationCompositionHandler setTestAutomationCompositionHandler(ToscaConceptIdentifier definition, - UUID uuid, ToscaConceptIdentifier participantId) { + UUID uuid, UUID participantId) { var ach = getMockAutomationCompositionHandler(); var key = getTestAutomationCompositionMap().keySet().iterator().next(); @@ -311,7 +310,7 @@ public class CommonTestData { * @param state a AutomationCompositionOrderedState * @return a AutomationCompositionStateChange */ - public AutomationCompositionStateChange getStateChange(ToscaConceptIdentifier participantId, UUID uuid, + public AutomationCompositionStateChange getStateChange(UUID participantId, UUID uuid, AutomationCompositionOrderedState state) { var stateChange = new AutomationCompositionStateChange(); stateChange.setAutomationCompositionId(UUID.randomUUID()); |