aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test/java
diff options
context:
space:
mode:
authorMateusz Gołuchowski <mateusz.goluchowski@nokia.com>2020-06-26 12:59:03 +0200
committerMateusz Gołuchowski <mateusz.goluchowski@nokia.com>2020-06-26 12:59:03 +0200
commite1fdca172977fdc48ab5222575f660a11e99964a (patch)
tree0a639ce3e03a3d18ab016b3a0b576815be3d51af /bpmn/MSOCommonBPMN/src/test/java
parentbd348d21b29a00e37f4828b5f0e967ceba0591f1 (diff)
AssignPnfBB - store model related PNF parameters in AAI
Issue-ID: SO-2640 Change-Id: I375db2004687f1f634adac31d4d1af3875f5981c Signed-off-by: Mateusz Goluchowski <mateusz.goluchowski@nokia.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPnfTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPnfTest.java
index 0eef9cccd8..aa9943b9b1 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPnfTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupPnfTest.java
@@ -29,6 +29,7 @@ import org.mockito.junit.MockitoJUnitRunner;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
+import org.onap.so.serviceinstancebeans.ModelInfo;
import org.onap.so.serviceinstancebeans.Pnfs;
import static org.mockito.Mockito.doReturn;
@@ -38,11 +39,22 @@ public class BBInputSetupPnfTest {
@Mock
private Pnfs pnfs;
+ @Mock
+ private ModelInfo modelInfo;
+
@Test
public void populatePnfShouldSetRequiredFields() {
final String pnfId = "PNF_id1";
final String pnfName = "PNF_name1";
+ final String modelCustomizationId = "8421fe03-fd1b-4bf7-845a-c3fe91edb031";
+ final String modelInvariantId = "3360a2a5-22ff-44c7-8935-08c8e5ecbd06";
+ final String modelVersionId = "b80c3a52-abd4-436c-a22e-9c5da768781a";
+
+ doReturn(modelCustomizationId).when(modelInfo).getModelCustomizationId();
+ doReturn(modelInvariantId).when(modelInfo).getModelInvariantId();
+ doReturn(modelVersionId).when(modelInfo).getModelVersionId();
doReturn(pnfName).when(pnfs).getInstanceName();
+ doReturn(modelInfo).when(pnfs).getModelInfo();
ServiceInstance serviceInstance = new ServiceInstance();
BBInputSetupPnf.populatePnfToServiceInstance(pnfs, pnfId, serviceInstance);
@@ -53,6 +65,9 @@ public class BBInputSetupPnfTest {
assertEquals(pnfId, pnf.getPnfId());
assertEquals(pnfName, pnf.getPnfName());
+ assertEquals(modelCustomizationId, pnf.getModelInfoPnf().getModelCustomizationUuid());
+ assertEquals(modelInvariantId, pnf.getModelInfoPnf().getModelInvariantUuid());
+ assertEquals(modelVersionId, pnf.getModelInfoPnf().getModelUuid());
assertEquals(OrchestrationStatus.PRECREATED, pnf.getOrchestrationStatus());
}
}