import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
+import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.servicedecomposition.bbobjects.AllottedResource;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.homingobjects.CandidateType;
import org.onap.so.client.exception.BadResponseException;
import org.onap.so.client.sniro.beans.SniroManagerRequest;
-import org.onap.so.BaseIntegrationTest;
+
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
public void testCallSniro_success_1VpnLink() throws BadResponseException, IOException{
beforeVpnBondingLink("1");
- stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
+ wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
.willReturn(aResponse().withStatus(200)
.withHeader("Content-Type", "application/json")
.withBody(mockResponse)));
beforeVpnBondingLink("2");
beforeVpnBondingLink("3");
- stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
+ wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
.willReturn(aResponse().withStatus(200)
.withHeader("Content-Type", "application/json")
.withBody(mockResponse)));
public void testCallSniro_success_3Allotteds() throws BadResponseException, JsonProcessingException{
beforeAllottedResource();
- stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
+ wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
.willReturn(aResponse().withStatus(200)
.withHeader("Content-Type", "application/json")
.withBody(mockResponse)));
public void testCallSniro_success_1Vnf() throws JsonProcessingException, BadResponseException{
beforeVnf();
- stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
+ wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
.willReturn(aResponse().withStatus(200)
.withHeader("Content-Type", "application/json")
.withBody(mockResponse)));
beforeAllottedResource();
beforeVnf();
- stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
+ wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
.willReturn(aResponse().withStatus(200)
.withHeader("Content-Type", "application/json")
.withBody(mockResponse)));
beforeAllottedResource();
mockResponse = "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"\", \"requestStatus\": \"failed\"}";
- stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
+ wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2"))
.willReturn(aResponse().withStatus(200)
.withHeader("Content-Type", "application/json")
.withBody(mockResponse)));