aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTestUtil.java
diff options
context:
space:
mode:
authorBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2019-03-25 10:07:38 +0100
committerBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2019-04-01 15:58:25 +0200
commit30794f9184dc2220a557ba5610a434c2a2bac801 (patch)
tree31831476e0bbee7f9cd85ff20b30723c456905fd /vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTestUtil.java
parent92c875958080d6e3039952b3ea3f8deab704ea51 (diff)
Sending workflow data from UI to SO
Change-Id: I39c78584c61eb317d4eaf2861ece810c1b60ab01 Issue-ID: VID-401 Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTestUtil.java')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTestUtil.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTestUtil.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTestUtil.java
index f10a7f14f..f66235728 100644
--- a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTestUtil.java
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTestUtil.java
@@ -37,8 +37,11 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.xebialabs.restito.semantics.Action;
import com.xebialabs.restito.server.StubServer;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.function.BiFunction;
import java.util.function.Function;
import javax.ws.rs.core.HttpHeaders;
@@ -50,6 +53,7 @@ import org.junit.Assert;
import org.onap.portalsdk.core.util.SystemProperties;
import org.onap.vid.changeManagement.RelatedInstanceList;
import org.onap.vid.changeManagement.RequestDetailsWrapper;
+import org.onap.vid.changeManagement.WorkflowRequestDetail;
import org.onap.vid.mso.MsoResponseWrapper;
import org.onap.vid.mso.model.CloudConfiguration;
import org.onap.vid.mso.model.ModelInfo;
@@ -200,6 +204,27 @@ class MsoRestClientTestUtil implements AutoCloseable {
return requestDetails;
}
+ static WorkflowRequestDetail createWorkflowRequestDetail() {
+ WorkflowRequestDetail workflowRequestDetail = new WorkflowRequestDetail();
+ org.onap.vid.changeManagement.RequestParameters requestParameters = new org.onap.vid.changeManagement.RequestParameters();
+ HashMap<String,String> paramsMap = new HashMap<>();
+ paramsMap.put("testKey1","testValue1");
+ paramsMap.put("testKey2","testValue2");
+
+ List<Map<String,String>> mapArray= new ArrayList<>();
+ mapArray.add(paramsMap);
+ requestParameters.setUserParams(mapArray);
+
+ CloudConfiguration cloudConfiguration = new CloudConfiguration();
+ cloudConfiguration.setCloudOwner("testOwne");
+ cloudConfiguration.setTenantId("testId");
+ cloudConfiguration.setLcpCloudRegionId("testLcpCloudId");
+
+ workflowRequestDetail.setRequestParameters(requestParameters);
+ workflowRequestDetail.setCloudConfiguration(cloudConfiguration);
+ return workflowRequestDetail;
+ }
+
private void verifyServer(StubServer server, String endpoint, Method httpMethod) {
verifyHttp(server).once(
method(httpMethod),