aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common/src/test/java
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2018-05-24 11:32:30 +0200
committerLukasz Muszkieta <lukasz.muszkieta@nokia.com>2018-05-24 11:49:26 +0200
commit155f10aee25fc1f89929e13a4a62a8335ee33279 (patch)
tree8c7a34799293f1497c3bd68387415743e061aa48 /mso-api-handlers/mso-api-handler-common/src/test/java
parent3ad1f7e9fd56d2d0eb9f0bde46b5b48cea9ed97a (diff)
Revert correlationId impl
This reverts commit c40b51651eff7997eb1bc823644a059b5406868c. Change-Id: I99e03cf9be05110ca7b4609a35ce7106f3c30b3b Issue-ID: SO-640 Signed-off-by: Lukasz Muszkieta <lukasz.muszkieta@nokia.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/test/java')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java
index 69927e2126..8bfc4ced76 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java
@@ -24,6 +24,7 @@ package org.openecomp.mso.camunda.tests;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
+import java.util.UUID;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
@@ -41,9 +42,12 @@ import org.mockito.MockitoAnnotations;
import org.openecomp.mso.apihandler.common.CommonConstants;
import org.openecomp.mso.apihandler.common.RequestClient;
import org.openecomp.mso.apihandler.common.RequestClientFactory;
-import org.openecomp.mso.apihandler.common.RequestClientParamater;
import org.openecomp.mso.properties.MsoJavaProperties;
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+
+
/**
* This class implements test methods of Camunda Beans.
*
@@ -62,7 +66,8 @@ public class CamundaClientTest {
}
@Test
- public void tesCamundaPost() throws IOException {
+ public void tesCamundaPost() throws JsonGenerationException,
+ JsonMappingException, IOException {
String responseBody ="{\"links\":[{\"method\":\"GET\",\"href\":\"http://localhost:9080/engine-rest/process-instance/2047c658-37ae-11e5-9505-7a1020524153\",\"rel\":\"self\"}],\"id\":\"2047c658-37ae-11e5-9505-7a1020524153\",\"definitionId\":\"dummy:10:73298961-37ad-11e5-9505-7a1020524153\",\"businessKey\":null,\"caseInstanceId\":null,\"ended\":true,\"suspended\":false}";
HttpResponse mockResponse = createResponse(200, responseBody);
@@ -101,6 +106,8 @@ public class CamundaClientTest {
mockHttpClient = Mockito.mock(HttpClient.class);
Mockito.when(mockHttpClient.execute(Mockito.any(HttpPost.class)))
.thenReturn(mockResponse);
+
+ String reqXML = "<xml>test</xml>";
String orchestrationURI = "/engine-rest/process-definition/key/dummy/start";
MsoJavaProperties props = new MsoJavaProperties();
@@ -108,7 +115,9 @@ public class CamundaClientTest {
RequestClient requestClient = RequestClientFactory.getRequestClient(orchestrationURI, props);
requestClient.setClient(mockHttpClient);
- HttpResponse response = requestClient.post(createParams());
+ HttpResponse response = requestClient.post("mso-req-id", false, 180,
+ "createInstance", "svc-inst-id", "vnf-id", "vf-module-id", "vg-id", "nw-id", "conf-id", "svc-type",
+ "vnf-type", "vf-module-type", "nw-type", "", "");
assertEquals(requestClient.getType(), CommonConstants.CAMUNDA);
assertEquals(response.getStatusLine().getStatusCode(), HttpStatus.SC_OK);
}
@@ -128,15 +137,6 @@ public class CamundaClientTest {
return response;
}
- private RequestClientParamater createParams(){
- return new RequestClientParamater.Builder().setRequestId("mso-req-id").setBaseVfModule(false).
- setRecipeTimeout(180).setRequestAction("createInstance").setServiceInstanceId("svc-inst-id").
- setVnfId("vnf-id").setVfModuleId("vf-module-id").setVolumeGroupId("vg-id").setNetworkId("nw-id").
- setConfigurationId("conf-id").setServiceType("svc-type").setVnfType("vnf-type").
- setVfModuleType("vf-module-type").setNetworkType("nw-type").setRequestDetails("").
- setRecipeParamXsd("").build();
- }
-