summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test/java/org
diff options
context:
space:
mode:
authorReshmasree <reshmasree.chamarthi2@wipro.com>2020-09-29 00:51:39 -0700
committerReshmasree <reshmasree.chamarthi2@wipro.com>2020-10-07 07:45:59 -0700
commit969745e59ab432a48685b89038d1c4c15a5ea9a1 (patch)
tree32d442437d577595c2c481f6bb389b7cc83eea3d /mso-api-handlers/mso-api-handler-infra/src/test/java/org
parent9a0dc7df054f5fb5abe2647a0c22b3eba6c83897 (diff)
Fix 3gppservices URI path
Issue-ID: SO-3275 Signed-off-by: Reshmasree <reshmasree.chamarthi2@wipro.com> Change-Id: I65feaa06927d58fae368aeb42b6cb4ce66d57cf4
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/java/org')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java
index c3c92be013..95f00c3a39 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java
@@ -55,9 +55,9 @@ import org.springframework.beans.factory.annotation.Autowired;
public class Onap3gppServiceInstancesTest extends BaseTest {
- private String onap3gppServicesUri = "/onap/so/infra/onap3gppServiceInstances/";
+ private static final String ONAP3GPPSERVICES_URI = "/onap/so/infra/3gppservices/";
- private final ObjectMapper mapper = new ObjectMapper();
+ private static final ObjectMapper MAPPER = new ObjectMapper();
@Autowired
private Onap3gppServiceInstances objUnderTest;
@@ -74,11 +74,11 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
wireMockServer.stubFor(get(urlPathEqualTo("/service/search/findFirstByModelNameOrderByModelVersionDesc"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
- .withBody(mapper.writeValueAsString(defaultService)).withStatus(HttpStatus.SC_OK)));
+ .withBody(MAPPER.writeValueAsString(defaultService)).withStatus(HttpStatus.SC_OK)));
wireMockServer.stubFor(get(urlPathEqualTo("/serviceRecipe/search/findFirstByServiceModelUUIDAndAction"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
- .withBody(mapper.writeValueAsString(serviceRecipe)).withStatus(HttpStatus.SC_OK)));
+ .withBody(MAPPER.writeValueAsString(serviceRecipe)).withStatus(HttpStatus.SC_OK)));
wireMockServer.stubFor(post(urlMatching(".*/infraActiveRequests/")).willReturn(aResponse()
.withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).withStatus(HttpStatus.SC_OK)));
Mockito.doReturn(null).when(requestsDbClient).getInfraActiveRequestbyRequestId(Mockito.any());
@@ -107,7 +107,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
@Test
public void createServiceInstanceTest() throws IOException {
- String uri = onap3gppServicesUri + "v1/allocate";
+ String uri = ONAP3GPPSERVICES_URI + "v1/allocate";
wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn(
aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json")
.withStatus(org.apache.http.HttpStatus.SC_ACCEPTED)));
@@ -123,7 +123,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
@Test
public void updateServiceInstanceTest() throws IOException {
- String uri = onap3gppServicesUri + "v1/modify";
+ String uri = ONAP3GPPSERVICES_URI + "v1/modify";
wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn(
aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json")
.withStatus(org.apache.http.HttpStatus.SC_ACCEPTED)));
@@ -139,7 +139,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
@Test
public void deleteServiceInstanceTest() throws IOException {
- String uri = onap3gppServicesUri + "v1/deAllocate";
+ String uri = ONAP3GPPSERVICES_URI + "v1/deAllocate";
wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn(
aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json")
.withStatus(org.apache.http.HttpStatus.SC_ACCEPTED)));
@@ -154,7 +154,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
@Test
public void activateServiceInstanceTest() throws IOException {
- String uri = onap3gppServicesUri + "v1/activate";
+ String uri = ONAP3GPPSERVICES_URI + "v1/activate";
wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn(
aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json")
.withStatus(org.apache.http.HttpStatus.SC_ACCEPTED)));
@@ -169,7 +169,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
@Test
public void deActivateServiceInstance() throws IOException {
- String uri = onap3gppServicesUri + "v1/deActivate";
+ String uri = ONAP3GPPSERVICES_URI + "v1/deActivate";
wireMockServer.stubFor(post(urlPathEqualTo("/mso/async/services/commonNssmfTest")).willReturn(
aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/BPMN_response.json")
.withStatus(org.apache.http.HttpStatus.SC_ACCEPTED)));
@@ -185,7 +185,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
@Test
public void getSliceSubnetCapabilitiesTest() throws IOException, ApiException {
String request = "{\"subnetTypes\":[\"AN\"]}";
- QuerySubnetCapability subnetCapabilityRequest = mapper.readValue(request, QuerySubnetCapability.class);
+ QuerySubnetCapability subnetCapabilityRequest = MAPPER.readValue(request, QuerySubnetCapability.class);
String expectedResponse =
"{\"AN\":{\"latency\":\"5\",\"maxNumberofUEs\":\"100\",\"maxThroughput\":\"150\",\"terminalDensity\":\"50\"}}";
Response response = objUnderTest.getSliceSubnetCapabilities(subnetCapabilityRequest, "v1");