summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java11
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java14
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/lcm/SotnServiceQryController.java5
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMgtController.java49
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMonitorController.java13
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java8
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAINetworkInterfaceResponseTest.java55
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAIOrchestratorRspTest.java59
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAISingleOrchestratorRspTest.java59
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/EsrSystemInfoTest.java67
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipDataTest.java8
11 files changed, 304 insertions, 44 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java
index 1f6ee7e3..22f8ca61 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceInstanceController.java
@@ -31,6 +31,7 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -61,7 +62,7 @@ public class ServiceInstanceController {
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/service-instances"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/service-instances"}, produces = "application/json")
public String listServiceInstances(HttpServletRequest request) throws JsonProcessingException{
ObjectMapper mapper = new ObjectMapper();
String customerId = request.getParameter("customerId");
@@ -76,7 +77,7 @@ public class ServiceInstanceController {
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/service-ns-instances"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/service-ns-instances"}, produces = "application/json")
public String listNsOrServiceInstances(HttpServletRequest request) throws JsonProcessingException{
ObjectMapper mapper = new ObjectMapper();
String customerId = request.getParameter("customerId");
@@ -95,19 +96,19 @@ public class ServiceInstanceController {
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/serviceNumByCustomer"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/serviceNumByCustomer"}, produces = "application/json")
public String serviceNumByCustomer(HttpServletRequest request) throws JsonProcessingException{
return serviceInstanceService.serviceNumByCustomer();
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/serviceNumByServiceType/{customerId}"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/serviceNumByServiceType/{customerId}"}, produces = "application/json")
public String serviceNumByServiceType(@PathVariable String customerId) throws JsonProcessingException{
return serviceInstanceService.serviceNumByServiceType(customerId);
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/getServiceInstanceById"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/getServiceInstanceById"}, produces = "application/json")
public String getServiceInstanceById(HttpServletRequest request){
String customerId = request.getParameter("customerId");
String serviceType = request.getParameter("serviceType");
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java
index 2f63425d..f3c16fa9 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java
@@ -32,6 +32,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -56,7 +60,7 @@ public class ServiceLcmController {
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/services"}, method = RequestMethod.POST , produces = "application/json")
+ @PostMapping(value = {"/uui-lcm/services"}, produces = "application/json")
public ServiceOperation instantiateService(HttpServletRequest request) throws ParseException{
String customerId = request.getParameter("customerId");
String serviceType = request.getParameter("serviceType");
@@ -75,7 +79,7 @@ public class ServiceLcmController {
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/services/{serviceId}/operations/{operationId}"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/services/{serviceId}/operations/{operationId}"}, produces = "application/json")
public OperationProgressInformation queryOperationProgress(HttpServletRequest request,@PathVariable(value="serviceId") String serviceId, @PathVariable(value="operationId") String operationId){
String operationType = request.getParameter("operationType");
String operationResult = CommonConstant.IN_PROGRESS_CODE;
@@ -99,7 +103,7 @@ public class ServiceLcmController {
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/services/{serviceId}"}, method = RequestMethod.DELETE , produces = "application/json")
+ @DeleteMapping(value = {"/uui-lcm/services/{serviceId}"}, produces = "application/json")
public DeleteOperationRsp terminateService(@PathVariable(value = "serviceId") String serviceId, HttpServletRequest request) throws ParseException{
DeleteOperationRsp deleteOperationRsp = serviceLcmService.terminateService(serviceId, request);
ServiceInstanceOperations serviceOpera = new ServiceInstanceOperations(serviceId,deleteOperationRsp.getOperationId(), CommonConstant.DELETING_CODE,"0", CommonConstant.IN_PROGRESS_CODE,DateUtils.dateToString(DateUtils.now()),null);
@@ -121,7 +125,7 @@ public class ServiceLcmController {
* @throws ParseException
*/
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/services/scaleServices/{serviceId}"}, method = RequestMethod.POST , produces = "application/json")
+ @PostMapping(value = {"/uui-lcm/services/scaleServices/{serviceId}"}, produces = "application/json")
public SaveOrUpdateOperationRsp scaleServices(@PathVariable(value = "serviceId") String serviceId, HttpServletRequest request) throws ParseException{
SaveOrUpdateOperationRsp saveOrUpdateOperationRsp =serviceLcmService.scaleService(serviceId, request);
ServiceInstanceOperations serviceOpera = new ServiceInstanceOperations(serviceId,saveOrUpdateOperationRsp.getOperationId(), CommonConstant.SCALING_CODE,"0", CommonConstant.IN_PROGRESS_CODE,DateUtils.dateToString(DateUtils.now()),null);
@@ -143,7 +147,7 @@ public class ServiceLcmController {
* @throws ParseException
*/
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/services/updateService/{serviceId}"}, method = RequestMethod.PUT , produces = "application/json")
+ @PutMapping(value = {"/uui-lcm/services/updateService/{serviceId}"}, produces = "application/json")
public SaveOrUpdateOperationRsp updateServices(@PathVariable(value = "serviceId") String serviceId, HttpServletRequest request) throws ParseException{
SaveOrUpdateOperationRsp saveOrUpdateOperationRsp =serviceLcmService.scaleService(serviceId, request);
ServiceInstanceOperations serviceOpera = new ServiceInstanceOperations(serviceId,saveOrUpdateOperationRsp.getOperationId(), CommonConstant.UPDATING_CODE,"0", CommonConstant.IN_PROGRESS_CODE,DateUtils.dateToString(DateUtils.now()),null);
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/SotnServiceQryController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/SotnServiceQryController.java
index 677e655a..9c68a65d 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/SotnServiceQryController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/SotnServiceQryController.java
@@ -24,6 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -50,7 +51,7 @@ public class SotnServiceQryController {
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/Sotnservices/ServiceInstances/{serviceType}"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/Sotnservices/ServiceInstances/{serviceType}"}, produces = "application/json")
public String getSotnServiceInstances(@PathVariable(value="serviceType") String serviceType){
System.out.println("Get Service Instance called.");
String response = sotnServiceQryService.getServiceInstances(serviceType);
@@ -58,7 +59,7 @@ public class SotnServiceQryController {
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/customers/service-subscriptions"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/customers/service-subscriptions"}, produces = "application/json")
public String getServiceSubscriptions(){
System.out.println("Get Service Subscription called.");
String response = ccvpnCustomerService.querySubscriptionType();
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMgtController.java b/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMgtController.java
index 40adc9c9..4187fc1a 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMgtController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMgtController.java
@@ -23,6 +23,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -41,103 +44,103 @@ public class ResourceMgtController {
}
@ResponseBody
- @RequestMapping(value = {
- "/business/pageNo/{pageNo}/pageSize/{pageSize}"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/business/pageNo/{pageNo}/pageSize/{pageSize}"}, produces = "application/json")
public ServiceResult querySlicingBusiness(@PathVariable int pageNo, @PathVariable int pageSize) {
return resourceMgtService.querySlicingBusiness(pageNo, pageSize);
}
@ResponseBody
- @RequestMapping(value = {
- "/{businessStatus}/business/pageNo/{pageNo}/pageSize/{pageSize}"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/{businessStatus}/business/pageNo/{pageNo}/pageSize/{pageSize}"}, produces = "application/json")
public ServiceResult querySlicingBusinessByStatus(@PathVariable String businessStatus, @PathVariable int pageNo,
@PathVariable int pageSize) {
return resourceMgtService.querySlicingBusinessByStatus(businessStatus, pageNo, pageSize);
}
@ResponseBody
- @RequestMapping(value = {
- "/business/{businessId}/details"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/business/{businessId}/details"}, produces = "application/json")
public ServiceResult querySlicingBusinessDetails(@PathVariable String businessId) {
return resourceMgtService.querySlicingBusinessDetails(businessId);
}
@ResponseBody
- @RequestMapping(value = {
- "/nsi/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/nsi/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, produces = "application/json")
public ServiceResult queryNsiInstances(@PathVariable int pageNo, @PathVariable int pageSize) {
return resourceMgtService.queryNsiInstances(pageNo, pageSize);
}
@ResponseBody
- @RequestMapping(value = {
- "/nsi/{instanceStatus}/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/nsi/{instanceStatus}/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, produces = "application/json")
public ServiceResult queryNsiInstancesByStatus(@PathVariable String instanceStatus, @PathVariable int pageNo,
@PathVariable int pageSize) {
return resourceMgtService.queryNsiInstancesByStatus(instanceStatus, pageNo, pageSize);
}
@ResponseBody
- @RequestMapping(value = {"/nsi/{nsiId}/details"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {"/nsi/{nsiId}/details"}, produces = "application/json")
public ServiceResult queryNsiDetails(@PathVariable String nsiId) {
return resourceMgtService.queryNsiDetails(nsiId);
}
@ResponseBody
- @RequestMapping(value = {"/nsi/{nsiId}/nssiInstances"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {"/nsi/{nsiId}/nssiInstances"}, produces = "application/json")
public ServiceResult queryNsiRelatedNssiInfo(@PathVariable String nsiId) {
return resourceMgtService.queryNsiRelatedNssiInfo(nsiId);
}
@ResponseBody
- @RequestMapping(value = {
- "/nssi/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/nssi/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, produces = "application/json")
public ServiceResult queryNssiInstances(@PathVariable int pageNo, @PathVariable int pageSize) {
return resourceMgtService.queryNssiInstances(pageNo, pageSize);
}
@ResponseBody
- @RequestMapping(value = {
- "/nssi/instanceStatus/{instanceStatus}/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/nssi/instanceStatus/{instanceStatus}/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, produces = "application/json")
public ServiceResult queryNssiInstancesByStatus(@PathVariable String instanceStatus, @PathVariable int pageNo,
@PathVariable int pageSize) {
return resourceMgtService.queryNssiInstancesByStatus(instanceStatus, pageNo, pageSize);
}
@ResponseBody
- @RequestMapping(value = {
- "/nssi/environmentContext/{environmentContext}/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {
+ "/nssi/environmentContext/{environmentContext}/instances/pageNo/{pageNo}/pageSize/{pageSize}"}, produces = "application/json")
public ServiceResult queryNssiInstancesByEnvironment(@PathVariable String environmentContext,
@PathVariable int pageNo, @PathVariable int pageSize) {
return resourceMgtService.queryNssiInstancesByEnvironment(environmentContext, pageNo, pageSize);
}
@ResponseBody
- @RequestMapping(value = {"/nssi/{nssiId}/details"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {"/nssi/{nssiId}/details"}, produces = "application/json")
public ServiceResult queryNssiDetails(@PathVariable String nssiId) {
return resourceMgtService.queryNssiDetails(nssiId);
}
@ResponseBody
- @RequestMapping(value = {"/{serviceId}/activate"}, method = RequestMethod.PUT, produces = "application/json")
+ @PutMapping(value = {"/{serviceId}/activate"}, produces = "application/json")
public ServiceResult activateSlicingService(@PathVariable(value = "serviceId") String serviceId) {
return resourceMgtService.activateSlicingService(serviceId);
}
@ResponseBody
- @RequestMapping(value = {"/{serviceId}/deactivate"}, method = RequestMethod.PUT, produces = "application/json")
+ @PutMapping(value = {"/{serviceId}/deactivate"}, produces = "application/json")
public ServiceResult deactivateSlicingService(@PathVariable(value = "serviceId") String serviceId) {
return resourceMgtService.deactivateSlicingService(serviceId);
}
@ResponseBody
- @RequestMapping(value = {"/{serviceId}"}, method = RequestMethod.DELETE, produces = "application/json")
+ @DeleteMapping(value = {"/{serviceId}"}, produces = "application/json")
public ServiceResult terminateSlicingService(@PathVariable(value = "serviceId") String serviceId) {
return resourceMgtService.terminateSlicingService(serviceId);
}
@ResponseBody
- @RequestMapping(value = {"/{serviceId}/progress"}, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {"/{serviceId}/progress"}, produces = "application/json")
public ServiceResult queryOperationProgress(@PathVariable(value = "serviceId") String serviceId) {
return resourceMgtService.queryOperationProgress(serviceId);
}
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMonitorController.java b/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMonitorController.java
index 3431412e..24ef506d 100644
--- a/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMonitorController.java
+++ b/server/src/main/java/org/onap/usecaseui/server/controller/nsmf/ResourceMonitorController.java
@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -43,8 +44,8 @@ public class ResourceMonitorController {
}
@ResponseBody
- @RequestMapping(value = {
- "/queryTimestamp/{queryTimestamp}/trafficData"}, method = RequestMethod.POST, produces = "application/json")
+ @PostMapping(value = {
+ "/queryTimestamp/{queryTimestamp}/trafficData"}, produces = "application/json")
public ServiceResult querySlicingUsageTraffic(@PathVariable(value = "queryTimestamp") String queryTimestamp,
@RequestBody
ServiceList serviceList) {
@@ -52,8 +53,8 @@ public class ResourceMonitorController {
}
@ResponseBody
- @RequestMapping(value = {
- "/queryTimestamp/{queryTimestamp}/onlineUsers"}, method = RequestMethod.POST, produces = "application/json")
+ @PostMapping(value = {
+ "/queryTimestamp/{queryTimestamp}/onlineUsers"}, produces = "application/json")
public ServiceResult querySlicingOnlineUserNumber(@PathVariable(value = "queryTimestamp") String queryTimestamp,
@RequestBody
ServiceList serviceList) {
@@ -61,8 +62,8 @@ public class ResourceMonitorController {
}
@ResponseBody
- @RequestMapping(value = {
- "/queryTimestamp/{queryTimestamp}/bandwidth"}, method = RequestMethod.POST, produces = "application/json")
+ @PostMapping(value = {
+ "/queryTimestamp/{queryTimestamp}/bandwidth"}, produces = "application/json")
public ServiceResult querySlicingTotalBandwidth(@PathVariable(value = "queryTimestamp") String queryTimestamp,
@RequestBody
ServiceList serviceList) {
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java
index 2d177f6b..4a414297 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java
@@ -15,7 +15,8 @@
*/
package org.onap.usecaseui.server.service.lcm.domain.aai.bean;
-import org.junit.Test;
+import org.junit.Assert;
+import org.junit.Test;
import org.junit.Before;
import org.junit.After;
import org.junit.runner.RunWith;
@@ -56,5 +57,10 @@ public class AAICustomerTest {
ac.getGlobalCustomerId();
ac.getSubscriberName();
ac.getSubscriberType();
+ ac.getResourceVersion();
+ Assert.assertEquals(ac.getGlobalCustomerId(),"globalCustomerId");
+ Assert.assertEquals(ac.getResourceVersion(),"resourceVersion");
+ Assert.assertEquals(ac.getSubscriberName(),"subscriberName");
+ Assert.assertEquals(ac.getSubscriberType(),"subscriberType");
}
}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAINetworkInterfaceResponseTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAINetworkInterfaceResponseTest.java
new file mode 100644
index 00000000..426e9692
--- /dev/null
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAINetworkInterfaceResponseTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START============================================
+ * ONAP
+ * =====================================================================
+ * Copyright (C) 2020 IBM Intellectual Property. All rights reserved.
+ * =====================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ============LICENSE_END================================================
+ *
+ *
+ */
+package org.onap.usecaseui.server.service.lcm.domain.aai.bean;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.Assert.*;
+
+public class AAINetworkInterfaceResponseTest {
+ @Test
+ public void getResultsTest() throws Exception
+ {
+ AAINetworkInterfaceResponse aaiNetworkresp = new AAINetworkInterfaceResponse();
+ Results res=new Results();
+ Results[] resArr=new Results[]{res};
+ aaiNetworkresp.setResults(resArr);
+ Assert.assertNotNull(aaiNetworkresp.getResults());
+ }
+
+}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAIOrchestratorRspTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAIOrchestratorRspTest.java
new file mode 100644
index 00000000..a5beb5c4
--- /dev/null
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAIOrchestratorRspTest.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START============================================
+ * ONAP
+ * =====================================================================
+ * Copyright (C) 2020 IBM Intellectual Property. All rights reserved.
+ * =====================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ============LICENSE_END================================================
+ *
+ *
+ */
+
+package org.onap.usecaseui.server.service.lcm.domain.aai.bean;
+
+import junit.framework.Assert.*;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertNotNull;
+
+public class AAIOrchestratorRspTest {
+ @Test
+ public void testGetEsrNfvo(){
+ AAIEsrNfvo aaiEsrNfvo = new AAIEsrNfvo("123", "123", "123", "123");
+ AAIOrchestratorRsp rsp=new AAIOrchestratorRsp();
+ List rspObj=new ArrayList<AAIEsrNfvo>();
+ rspObj.add(aaiEsrNfvo);
+ rsp.setEsrNfvo(rspObj);
+ assertNotNull(rsp);
+ }
+}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAISingleOrchestratorRspTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAISingleOrchestratorRspTest.java
new file mode 100644
index 00000000..ba4af0d9
--- /dev/null
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAISingleOrchestratorRspTest.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START============================================
+ * ONAP
+ * =====================================================================
+ * Copyright (C) 2020 IBM Intellectual Property. All rights reserved.
+ * =====================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ============LICENSE_END================================================
+ *
+ *
+ */
+package org.onap.usecaseui.server.service.lcm.domain.aai.bean;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.Assert.*;
+
+public class AAISingleOrchestratorRspTest {
+
+ @Test
+ public void testGetMethods(){
+ AAISingleOrchestratorRsp test=new AAISingleOrchestratorRsp();
+ test.setApiRoot("apiRoot");
+ test.setNfvoId("id");
+ test.setResourceVersion("1.0");
+ Assert.assertEquals(test.getApiRoot(),"apiRoot");
+ Assert.assertEquals(test.getNfvoId(),"id");
+ Assert.assertEquals(test.getResourceVersion(),"1.0");
+ EsrSystemInfoList esr=new EsrSystemInfoList();
+ test.setEsrSystemInfo(esr);
+ test.getEsrSystemInfoList();
+ }
+}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/EsrSystemInfoTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/EsrSystemInfoTest.java
new file mode 100644
index 00000000..b912b785
--- /dev/null
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/EsrSystemInfoTest.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START============================================
+ * ONAP
+ * =====================================================================
+ * Copyright (C) 2020 IBM Intellectual Property. All rights reserved.
+ * =====================================================================
+ *
+ * Unless otherwise specified, all software contained herein is licensed
+ * under the Apache License, Version 2.0 (the "License");
+ * you may not use this software except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ============LICENSE_END================================================
+ *
+ *
+ */
+package org.onap.usecaseui.server.service.lcm.domain.aai.bean;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class EsrSystemInfoTest {
+
+ @Test
+ public void testGetterMethods(){
+ EsrSystemInfo esr= new EsrSystemInfo();
+ esr.setEsrSystemInfoId("id");
+ esr.setPassword("test123");
+ esr.setResourceVersion("1.0");
+ esr.setServiceUrl("www.example.com");
+ esr.setSystemName("test");
+ esr.setSystemType("test");
+ esr.setVendor("vendor");
+ esr.setUserName("test");
+ esr.setVersion("1.0");
+ Assert.assertEquals(esr.getEsrSystemInfoId(),"id");
+ Assert.assertEquals(esr.getPassword(),"test123");
+ Assert.assertEquals(esr.getResourceVersion(),"1.0");
+ Assert.assertEquals(esr.getServiceUrl(),"www.example.com");
+ Assert.assertEquals(esr.getSystemName(),"test");
+ Assert.assertEquals(esr.getSystemType(),"test");
+ Assert.assertEquals(esr.getVendor(),"vendor");
+ Assert.assertEquals(esr.getUserName(),"test");
+ Assert.assertEquals(esr.getVersion(),"1.0");
+ }
+}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipDataTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipDataTest.java
index 77b69dac..5e0923b7 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipDataTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/RelationshipDataTest.java
@@ -16,6 +16,7 @@ package org.onap.usecaseui.server.service.lcm.domain.aai.bean;
*/
import org.junit.After;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -29,13 +30,16 @@ public class RelationshipDataTest {
public void after() throws Exception {
}
+ @Test
public void relationshipdatatest() throws Exception
{
RelationshipData relationshipData = new RelationshipData();
- relationshipData.getRelationshipKey();
- relationshipData.getRelationshipValue();
relationshipData.setRelationshipKey("123");
relationshipData.setRelationshipValue("123");
+
+ Assert.assertEquals(relationshipData.getRelationshipKey(),"123");
+ Assert.assertEquals(relationshipData.getRelationshipValue(),"123");
+
}
}