aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap
diff options
context:
space:
mode:
authordeepikasatheesh <deepika.s84@wipro.com>2020-09-08 05:51:24 -0700
committerdeepikasatheesh <deepika.s84@wipro.com>2020-09-10 07:59:09 -0700
commit30c6bacb158f5446915a772745f33a28d8da5ea2 (patch)
tree3d448d0faa9d37a5661322208219ac10d3a34808 /mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap
parent332383726cf074facc419588258abff96a9a113f (diff)
Implement Subnet Capability query functionality
Issue-ID: SO-3222 Signed-off-by: deepikasatheesh <deepika.s84@wipro.com> Change-Id: I1797aeb1f2b4b461cee627200bda8312a0803524
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java17
1 files changed, 17 insertions, 0 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 503af1bdcb..c3c92be013 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
@@ -49,6 +49,9 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.util.UriComponentsBuilder;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.onap.so.apihandlerinfra.onap3gppserviceinstancebeans.QuerySubnetCapability;
+import org.springframework.beans.factory.annotation.Autowired;
public class Onap3gppServiceInstancesTest extends BaseTest {
@@ -56,6 +59,9 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
private final ObjectMapper mapper = new ObjectMapper();
+ @Autowired
+ private Onap3gppServiceInstances objUnderTest;
+
@Before
public void init() throws JsonProcessingException {
@@ -176,6 +182,17 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
assertEquals(expectedResponse, actualResponse);
}
+ @Test
+ public void getSliceSubnetCapabilitiesTest() throws IOException, ApiException {
+ String request = "{\"subnetTypes\":[\"AN\"]}";
+ QuerySubnetCapability subnetCapabilityRequest = mapper.readValue(request, QuerySubnetCapability.class);
+ String expectedResponse =
+ "{\"AN\":{\"latency\":\"5\",\"maxNumberofUEs\":\"100\",\"maxThroughput\":\"150\",\"terminalDensity\":\"50\"}}";
+ Response response = objUnderTest.getSliceSubnetCapabilities(subnetCapabilityRequest, "v1");
+ String actualResponse = (String) response.getEntity();
+ assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());
+ assertEquals(expectedResponse, actualResponse);
+ }
}