aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java/org
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-09-24 08:11:01 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-24 08:11:01 +0000
commit607af7badab5f694a0689cb9d359d543c9275809 (patch)
tree2e8274258ce54302d4044e58231c5fab6e3cdcbb /vid-app-common/src/test/java/org
parente5922e48d5ef9a2cbf19693135e11b5b7747a04f (diff)
parent2edfe7ed72d64e37fe98e99418d28400c59a9c12 (diff)
Merge "Add a position field to BaseResource"
Diffstat (limited to 'vid-app-common/src/test/java/org')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java17
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java14
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java2
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java3
4 files changed, 22 insertions, 14 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java
index 2780e1515..9501614b7 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java
@@ -273,30 +273,35 @@ public class ResourceCommandTest {
}
static InstanceGroup createGroup(List<InstanceGroupMember> groupMembers, Action action) {
- return new InstanceGroup(mock(ModelInfo.class), null, action.name(), false, null, convertToMap(groupMembers), null, null, null);
+ return new InstanceGroup(mock(ModelInfo.class), null, action.name(), false, null, convertToMap(groupMembers), null, null, null,
+ null);
}
static InstanceGroupMember createMember(Action action) {
- return new InstanceGroupMember(null, action.toString(), null, null, null);
+ return new InstanceGroupMember(null, action.toString(), null, null, null, null);
}
static Vnf createVnf(List<VfModule> vfModules, Action action) {
Map<String, Map<String, VfModule>> vfModulesMap = new HashMap<>();
vfModulesMap.put("abc",convertToMap(vfModules));
- return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, vfModulesMap, null, null, null);
+ return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, vfModulesMap, null, null, null,
+ null);
}
static Vnf createVnf(Action action) {
- return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null,null, null, null, null);
+ return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null,null, null, null, null,
+ null);
}
static VfModule createVfModule(Action action) {
- return new VfModule(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, false, false, null, null, null, null);
+ return new VfModule(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, false, false, null, null, null, null,
+ null);
}
static Network createNetwork(Action action) {
- return new Network(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, null, null, null);
+ return new Network(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, null, null, null,
+ null);
}
}
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java
index 9cc97116b..9c0260e85 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java
@@ -171,11 +171,12 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
vfModuleInfo.setModelInvariantId("22222222-f63c-463e-ba94-286933b895f9");
vfModuleInfo.setModelVersion("10.0");
return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), "mdt1", null,
- "88a6ca3ee0394ade9403f075db23167e", instanceParams, supplementaryParams, false, true, null, UUID.randomUUID().toString(), null, null);
+ "88a6ca3ee0394ade9403f075db23167e", instanceParams, supplementaryParams, false, true, null, UUID.randomUUID().toString(), null, null,
+ null);
}
return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), null, null, null,
- instanceParams, supplementaryParams, false, false, null, UUID.randomUUID().toString(), null, null);
+ instanceParams, supplementaryParams, false, false, null, UUID.randomUUID().toString(), null, null, null);
}
protected ModelInfo createVfModuleModelInfo(String modelName, String modelVersion, String modelVersionId, String modelInvariantId, String modelCustomizationId, String modelCustomizationName) {
@@ -184,7 +185,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
protected VfModule createVfModuleForReplace(ModelInfo vfModuleModelInfo, String instanceName, String lcpCloudRegionId, String tenantId) {
return new VfModule( vfModuleModelInfo, instanceName, null, Action.Upgrade.name(), lcpCloudRegionId, null, tenantId,
- null, null, true, null, null, UUID.randomUUID().toString(), null, null);
+ null, null, true, null, null, UUID.randomUUID().toString(), null, null, null);
}
protected ModelInfo createVnfModelInfo(boolean isAlacarte) {
@@ -267,7 +268,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
Vnf vnf = new Vnf(vnfModelInfo, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", (isUserProvidedNaming ? VNF_NAME : null), Action.Create.name(),
"platformName", "mdt1", null, "88a6ca3ee0394ade9403f075db23167e", vnfInstanceParams,"lineOfBusinessName" , false, null, vfModules,
- UUID.randomUUID().toString(), null, null);
+ UUID.randomUUID().toString(), null, null, null);
vnfs.put(vnf.getModelInfo().getModelName(), vnf);
return vnfs;
@@ -320,7 +321,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
details->new Network(createNetworkModelInfo(isALaCarte, details.modelCustomizationId), "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
details.name, Action.Create.name(),
"platformName", "mdt1", null, "88a6ca3ee0394ade9403f075db23167e", instanceParams,"lineOfBusinessName" ,
- false, null, UUID.randomUUID().toString(), null, null));
+ false, null, UUID.randomUUID().toString(), null, null, null));
// I can't tell why compiler don't like the statement if it's only one line...
return networkStream.collect(Collectors.toMap(network -> network.getModelInfo().getModelCustomizationId(), network -> network));
}
@@ -335,7 +336,8 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
modelInfo.setModelInvariantId("11111111-f63c-463e-ba94-286933b895f9");
modelInfo.setModelVersion("10.0");
- return new InstanceGroup(modelInfo, (isUserProvidedNaming ? VNF_GROUP_NAME : null), action.name(), false, null, emptyMap(), UUID.randomUUID().toString(), null, null);
+ return new InstanceGroup(modelInfo, (isUserProvidedNaming ? VNF_GROUP_NAME : null), action.name(), false, null, emptyMap(), UUID.randomUUID().toString(), null, null,
+ null);
}
protected ModelInfo createServiceModelInfo() {
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java
index ce0aa42f2..c1a6abc73 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java
@@ -1048,7 +1048,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT
public void whenLcpRegionNotEmpty_thenCloudRegionIdOfResourceIsLegacy() {
String legacyCloudRegion = "legacyCloudRegion";
Vnf vnf = new Vnf(new ModelInfo(), null, null, Action.Create.name(), null, "anyCloudRegion", legacyCloudRegion,
- null, null, null, false, null, null, UUID.randomUUID().toString(), null, null);
+ null, null, null, false, null, null, UUID.randomUUID().toString(), null, null, null);
assertThat(vnf.getLcpCloudRegionId(), equalTo(legacyCloudRegion));
}
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java b/vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java
index 2c70b3ddc..e28ea304f 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java
@@ -533,7 +533,8 @@ public class MsoRequestBuilderTest extends AsyncInstantiationBaseTest {
" }" +
"}";
Vnf vnfDetails = new Vnf(createVnfModelInfo(true), "productFamily", "instanceName", Action.Delete.name(), "platform", "AAIAIC25", null,
- "092eb9e8e4b7412e8787dd091bc58e86", null, null, false, "VNF_INSTANCE_ID", null, UUID.randomUUID().toString(), null, null);
+ "092eb9e8e4b7412e8787dd091bc58e86", null, null, false, "VNF_INSTANCE_ID", null, UUID.randomUUID().toString(), null, null,
+ null);
RequestDetailsWrapper<VnfInstantiationRequestDetails> result =
msoRequestBuilder.generateDeleteVnfRequest(vnfDetails, "az2018");
MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);