summaryrefslogtreecommitdiffstats
path: root/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap
diff options
context:
space:
mode:
authorJoanna Jeremicz <joanna.jeremicz@nokia.com>2019-02-25 09:11:16 +0100
committerMichal Kabaj <michal.kabaj@nokia.com>2019-02-28 11:22:04 +0100
commitfee6611fa805b6bb5f06f07b45396a71ad72c564 (patch)
treed55aea0fd3cdfc53d96fe11489828c015fdb8dfc /bpmn/mso-infrastructure-bpmn/src/test/java/org/onap
parentade5e9910524146f2257183909842263136698cc (diff)
CorrelationId cleanup
Remove old correlationId field and references from ServiceInstancesRequest and rename correlationId to pnfCorrelationId Change-Id: I5d8861aebe14c68574b6c54bc8d4eadf2967478b Issue-ID: SO-1274 Signed-off-by: Michal Kabaj <michal.kabaj@nokia.com>
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn/src/test/java/org/onap')
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java10
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java18
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java8
3 files changed, 18 insertions, 18 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
index 13fe61f704..5cc0281407 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
@@ -23,7 +23,7 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
import java.util.HashMap;
@@ -62,7 +62,7 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
@Test
public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenAaiEntryExists() {
// given
- variables.put(CORRELATION_ID, PnfManagementTestImpl.ID_WITH_ENTRY);
+ variables.put(PNF_CORRELATION_ID, PnfManagementTestImpl.ID_WITH_ENTRY);
// when
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
@@ -73,7 +73,7 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
assertThat(instance).isEnded().hasPassedInOrder(
"CreateAndActivatePnf_StartEvent",
"CheckInputs",
- "CheckAiiForCorrelationId",
+ "CheckAiiForPnfCorrelationId",
"DoesAaiContainInfoAboutPnf",
"AaiEntryExists",
"InformDmaapClient",
@@ -88,7 +88,7 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
@Test
public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntryExists() {
// given
- variables.put(CORRELATION_ID, PnfManagementTestImpl.ID_WITHOUT_ENTRY);
+ variables.put(PNF_CORRELATION_ID, PnfManagementTestImpl.ID_WITHOUT_ENTRY);
// when
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
@@ -99,7 +99,7 @@ public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
assertThat(instance).isEnded().hasPassedInOrder(
"CreateAndActivatePnf_StartEvent",
"CheckInputs",
- "CheckAiiForCorrelationId",
+ "CheckAiiForPnfCorrelationId",
"DoesAaiContainInfoAboutPnf",
"CreatePnfEntryInAai",
"AaiEntryExists",
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
index 146e07b820..6a5f9fac74 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
@@ -30,19 +30,19 @@ import org.springframework.stereotype.Component;
@Primary
public class DmaapClientTestImpl implements DmaapClient {
- private String correlationId;
+ private String pnfCorrelationId;
private Runnable informConsumer;
@Override
- public void registerForUpdate(String correlationId, Runnable informConsumer) {
- this.correlationId = correlationId;
+ public void registerForUpdate(String pnfCorrelationId, Runnable informConsumer) {
+ this.pnfCorrelationId = pnfCorrelationId;
this.informConsumer = informConsumer;
}
@Override
- public Runnable unregister(String correlationId) {
- if (Objects.equals(this.correlationId, correlationId)) {
- this.correlationId = null;
+ public Runnable unregister(String pnfCorrelationId) {
+ if (Objects.equals(this.pnfCorrelationId, pnfCorrelationId)) {
+ this.pnfCorrelationId = null;
Runnable informConsumer = this.informConsumer;
this.informConsumer = null;
return informConsumer;
@@ -50,8 +50,8 @@ public class DmaapClientTestImpl implements DmaapClient {
return null;
}
- public String getCorrelationId() {
- return correlationId;
+ public String getPnfCorrelationId() {
+ return pnfCorrelationId;
}
public Runnable getInformConsumer() {
@@ -63,6 +63,6 @@ public class DmaapClientTestImpl implements DmaapClient {
}
public boolean haveRegisteredConsumer() {
- return correlationId != null;
+ return pnfCorrelationId != null;
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java
index 84c983619b..f9db93e3f7 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfManagementTestImpl.java
@@ -40,8 +40,8 @@ public class PnfManagementTestImpl implements PnfManagement {
private Map<String, String> serviceAndPnfRelationMap = new HashMap<>();
@Override
- public Optional<Pnf> getEntryFor(String correlationId) {
- if (Objects.equals(correlationId, ID_WITH_ENTRY)) {
+ public Optional<Pnf> getEntryFor(String pnfCorrelationId) {
+ if (Objects.equals(pnfCorrelationId, ID_WITH_ENTRY)) {
return Optional.of(new Pnf());
} else {
return Optional.empty();
@@ -49,8 +49,8 @@ public class PnfManagementTestImpl implements PnfManagement {
}
@Override
- public void createEntry(String correlationId, Pnf entry) {
- created.put(correlationId, entry);
+ public void createEntry(String pnfCorrelationId, Pnf entry) {
+ created.put(pnfCorrelationId, entry);
}
@Override