summaryrefslogtreecommitdiffstats
path: root/bpmn/mso-infrastructure-bpmn
diff options
context:
space:
mode:
authorJoanna Jeremicz <joanna.jeremicz@nokia.com>2018-12-05 10:38:39 +0100
committerJoanna Jeremicz <joanna.jeremicz@nokia.com>2018-12-18 12:03:38 +0100
commit522bb0f585c7248a99c26cc10a5bbc0954e27e82 (patch)
tree9440bb69ac37f96b657d90d4f91059bba0c493e5 /bpmn/mso-infrastructure-bpmn
parent090cb77be5c347cc764920fea491a149b5380bcf (diff)
Use UUID to fill pnf-id in PNF PnP
Issue-ID: SO-1272 Change-Id: If516b7ec38dad3fbc7409aff42275a98ef2af76b Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com>
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn')
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java18
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml2
2 files changed, 13 insertions, 7 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 2348af5dec..55910518e0 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
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright 2018 Nokia
+ * ================================================================================
* 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
@@ -20,6 +22,12 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
import org.assertj.core.api.Assertions;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.runtime.ProcessInstance;
@@ -34,11 +42,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
-
@RunWith(SpringRunner.class)
@ContextConfiguration(locations = "/applicationContext_forPnfTesting.xml")
public class CreateAndActivatePnfResourceTest {
@@ -50,6 +53,7 @@ public class CreateAndActivatePnfResourceTest {
@Autowired
@Rule
public ProcessEngineRule processEngineRule;
+ private static final String VALID_UUID = UUID.nameUUIDFromBytes("testUuid".getBytes()).toString();
@Autowired
private AaiConnectionTestImpl aaiConnection;
@@ -66,6 +70,7 @@ public class CreateAndActivatePnfResourceTest {
Map<String, Object> variables = new HashMap<>();
variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S);
variables.put(CORRELATION_ID, AaiConnectionTestImpl.ID_WITH_ENTRY);
+ variables.put(PNF_UUID, VALID_UUID);
// when
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
@@ -94,6 +99,7 @@ public class CreateAndActivatePnfResourceTest {
Map<String, Object> variables = new HashMap<>();
variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S);
variables.put(CORRELATION_ID, AaiConnectionTestImpl.ID_WITHOUT_ENTRY);
+ variables.put(PNF_UUID, VALID_UUID);
// when
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
@@ -106,7 +112,7 @@ public class CreateAndActivatePnfResourceTest {
"CheckInputs",
"CheckAiiForCorrelationId",
"DoesAaiContainInfoAboutPnf",
- "CreateAndActivatePnf_CreateAaiEntry",
+ "CreatePnfEntryInAai",
"AaiEntryExists",
"InformDmaapClient",
"WaitForDmaapPnfReadyNotification",
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml b/bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml
index 3a41801d4a..9e9e5a2177 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml
+++ b/bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml
@@ -52,7 +52,7 @@
<property name="aaiConnection" ref="aaiConnection"/>
</bean>
- <bean id="CreateAaiEntryWithPnfIdDelegate" class="org.onap.so.bpmn.infrastructure.pnf.delegate.CreateAaiEntryWithPnfIdDelegate">
+ <bean id="CreatePnfEntryInAaiDelegate" class="org.onap.so.bpmn.infrastructure.pnf.delegate.CreatePnfEntryInAaiDelegate">
<property name="aaiConnection" ref="aaiConnection"/>
</bean>