diff options
author | saul.gill <saul.gill@est.tech> | 2023-02-02 11:40:29 +0000 |
---|---|---|
committer | saul.gill <saul.gill@est.tech> | 2023-02-02 11:40:35 +0000 |
commit | 9659c99c9c8b4b7ce33d7f48e61df44a03090186 (patch) | |
tree | d04b196466e12895183e95ac7885427ca5482e69 /models/src/test/java | |
parent | 203a14a0c5397096f4b6918cd587248ea275e245 (diff) |
Refactor ParticipantUpdate to ParticipantPrime
Refactored ParticipantUpdateAck to ParticipantPrimeAck
Refactored ParticipantUpdate to ParticipantPrime
Refactored all associated tests and code
Issue-ID: POLICY-4548
Change-Id: I2265777add4e088173ec465603e26143e3f40070
Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'models/src/test/java')
-rw-r--r-- | models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeAckTest.java (renamed from models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateAckTest.java) | 16 | ||||
-rw-r--r-- | models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeTest.java (renamed from models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateTest.java) | 10 |
2 files changed, 13 insertions, 13 deletions
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateAckTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeAckTest.java index e2c3454a4..e4684b8d0 100644 --- a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateAckTest.java +++ b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeAckTest.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2021-2022 Nordix Foundation. + * Copyright (C) 2021-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. @@ -30,30 +30,30 @@ import org.junit.jupiter.api.Test; import org.onap.policy.common.utils.coder.CoderException; import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; -class ParticipantUpdateAckTest { +class ParticipantPrimeAckTest { @Test void testCopyConstructor() throws CoderException { - assertThatThrownBy(() -> new ParticipantUpdateAck(null)).isInstanceOf(NullPointerException.class); + assertThatThrownBy(() -> new ParticipantPrimeAck(null)).isInstanceOf(NullPointerException.class); - final ParticipantUpdateAck orig = new ParticipantUpdateAck(); + final ParticipantPrimeAck orig = new ParticipantPrimeAck(); // verify with null values assertEquals(removeVariableFields(orig.toString()), - removeVariableFields(new ParticipantUpdateAck(orig).toString())); + removeVariableFields(new ParticipantPrimeAck(orig).toString())); // verify with all values ToscaConceptIdentifier id = new ToscaConceptIdentifier(); id.setName("id"); id.setVersion("1.2.3"); orig.setResponseTo(UUID.randomUUID()); - orig.setMessageType(ParticipantMessageType.PARTICIPANT_UPDATE_ACK); + orig.setMessageType(ParticipantMessageType.PARTICIPANT_PRIME_ACK); orig.setResult(true); orig.setMessage("Successfully processed message"); assertEquals(removeVariableFields(orig.toString()), - removeVariableFields(new ParticipantUpdateAck(orig).toString())); + removeVariableFields(new ParticipantPrimeAck(orig).toString())); - assertSerializable(orig, ParticipantUpdateAck.class); + assertSerializable(orig, ParticipantPrimeAck.class); } } diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeTest.java index ffbd63f1a..890fc55ae 100644 --- a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateTest.java +++ b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeTest.java @@ -40,12 +40,12 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; /** * Test the copy constructor. */ -class ParticipantUpdateTest { +class ParticipantPrimeTest { @Test void testCopyConstructor() throws CoderException { - assertThatThrownBy(() -> new ParticipantUpdate(null)).isInstanceOf(NullPointerException.class); + assertThatThrownBy(() -> new ParticipantPrime(null)).isInstanceOf(NullPointerException.class); - var orig = new ParticipantUpdate(); + var orig = new ParticipantPrime(); // verify with all values orig.setAutomationCompositionId(UUID.randomUUID()); orig.setParticipantId(CommonTestData.getParticipantId()); @@ -70,11 +70,11 @@ class ParticipantUpdateTest { participantDefinitionUpdate.setAutomationCompositionElementDefinitionList(List.of(acDefinition)); orig.setParticipantDefinitionUpdates(List.of(participantDefinitionUpdate)); - var other = new ParticipantUpdate(orig); + var other = new ParticipantPrime(orig); assertEquals(removeVariableFields(orig.toString()), removeVariableFields(other.toString())); - assertSerializable(orig, ParticipantUpdate.class); + assertSerializable(orig, ParticipantPrime.class); } private AutomationCompositionElementDefinition getAcElementDefinition(ToscaConceptIdentifier id) { |