diff options
author | hekeguang <hekeguang@chinamobile.com> | 2022-02-22 22:11:10 +0800 |
---|---|---|
committer | hekeguang <hekeguang@chinamobile.com> | 2022-02-22 22:11:37 +0800 |
commit | 258780bd00f4409869da061768bbc3914593143a (patch) | |
tree | 4c2bd70a582623fd414021c8c8a9db99ff49e597 | |
parent | 4df512519f875158b0bcb1cb5b63bf32df74d726 (diff) |
Add test code to meet the goal of test coverage.
Issue-ID: USECASEUI-643
Change-Id: Iaf6af2deb227c4f1d4a13f3bac5542f0e0249955
Signed-off-by: hekeguang <hekeguang@chinamobile.com>
16 files changed, 930 insertions, 0 deletions
diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/HttpResponseResultTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/HttpResponseResultTest.java new file mode 100644 index 00000000..a548eb2d --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/HttpResponseResultTest.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class HttpResponseResultTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetHttpResponseResult() throws Exception { + int resultCode = 123; + String resultContent = "123"; + HttpResponseResult httpResponseResult = new HttpResponseResult(resultCode, resultContent); + httpResponseResult.setResultCode(123); + httpResponseResult.setResultContent("123"); + httpResponseResult.getResultCode(); + httpResponseResult.getResultContent(); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/ServiceBeanTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/ServiceBeanTest.java new file mode 100644 index 00000000..570017e2 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/ServiceBeanTest.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class ServiceBeanTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetServiceBean() throws Exception { + ServiceBean serviceBean = new ServiceBean(); + serviceBean.setCustomerId("123"); + serviceBean.setId("123"); + serviceBean.setInvariantUuuid("123"); + serviceBean.setServiceDomain("domain"); + serviceBean.setServiceInstanceId("123"); + serviceBean.setServiceType("type1"); + serviceBean.setUuid("123"); + + serviceBean.getCustomerId(); + serviceBean.getId(); + serviceBean.getInvariantUuuid(); + serviceBean.getServiceDomain(); + serviceBean.getServiceInstanceId(); + serviceBean.getServiceType(); + serviceBean.getUuid(); + + ServiceBean serviceBean1 = new ServiceBean("123", "123", "123", "123", "123", "123", "123"); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/ServiceInstanceOperationsTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/ServiceInstanceOperationsTest.java new file mode 100644 index 00000000..fab19757 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/ServiceInstanceOperationsTest.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class ServiceInstanceOperationsTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetServiceInstanceOperations() throws Exception { + ServiceInstanceOperations serviceInstanceOperations = new ServiceInstanceOperations(); + serviceInstanceOperations.setEndTime("123"); + serviceInstanceOperations.setOperationId("123"); + serviceInstanceOperations.setOperationProgress("50%"); + serviceInstanceOperations.setOperationResult("success"); + serviceInstanceOperations.setOperationType("type1"); + serviceInstanceOperations.setServiceInstanceId("123"); + serviceInstanceOperations.setStartTime("123"); + + serviceInstanceOperations.getOperationId(); + serviceInstanceOperations.getOperationType(); + serviceInstanceOperations.getEndTime(); + serviceInstanceOperations.getOperationProgress(); + serviceInstanceOperations.getOperationResult(); + serviceInstanceOperations.getServiceInstanceId(); + serviceInstanceOperations.getStartTime(); + + ServiceInstanceOperations serviceInstanceOperations2 = new ServiceInstanceOperations("123", "123", "123", "123", "123", "123","123"); + serviceInstanceOperations2.hashCode(); + serviceInstanceOperations2.equals(serviceInstanceOperations); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/SortMasterTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/SortMasterTest.java new file mode 100644 index 00000000..ef687f22 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/SortMasterTest.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class SortMasterTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetSortMaster() throws Exception { + SortMaster sortMaster = new SortMaster(); + sortMaster.setLanguage("eng"); + sortMaster.setSortCode("123"); + sortMaster.setSortType("type1"); + sortMaster.setSortValue("123"); + + sortMaster.getLanguage(); + sortMaster.getSortCode(); + sortMaster.getSortType(); + sortMaster.getSortValue(); + + SortMaster sortMaster1 = new SortMaster("123", "123", "123", "123"); + sortMaster.toString(); + sortMaster.hashCode(); + sortMaster.equals(sortMaster1); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/intent/CCVPNInstanceTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/intent/CCVPNInstanceTest.java new file mode 100644 index 00000000..69ebdc57 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/intent/CCVPNInstanceTest.java @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.intent; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.onap.usecaseui.server.bean.csmf.CreateResponse; +import org.onap.usecaseui.server.bean.csmf.CreateResult; + +public class CCVPNInstanceTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetCCVPNInstance() throws Exception { + + CCVPNInstance ccvpnInstance = new CCVPNInstance(); + ccvpnInstance.setAccessPointOneBandWidth(500); + ccvpnInstance.setAccessPointOneName("name"); + ccvpnInstance.setCloudPointName("pointname"); + ccvpnInstance.setDeleteState(1); + ccvpnInstance.setId(123); + ccvpnInstance.setJobId("123"); + ccvpnInstance.setLineNum("5"); + ccvpnInstance.setName("ccvpn"); + ccvpnInstance.setProgress(3); + ccvpnInstance.setInstanceId("123"); + ccvpnInstance.setResourceInstanceId("123"); + ccvpnInstance.setStatus("3"); + + ccvpnInstance.getAccessPointOneBandWidth(); + ccvpnInstance.getAccessPointOneName(); + ccvpnInstance.getCloudPointName(); + ccvpnInstance.getDeleteState(); + ccvpnInstance.getId(); + ccvpnInstance.getInstanceId(); + ccvpnInstance.getJobId(); + ccvpnInstance.getLineNum(); + ccvpnInstance.getName(); + ccvpnInstance.getProgress(); + ccvpnInstance.getResourceInstanceId(); + ccvpnInstance.getStatus(); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/intent/InstancePerformanceTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/intent/InstancePerformanceTest.java new file mode 100644 index 00000000..806accf9 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/intent/InstancePerformanceTest.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.intent; + +import java.util.Date; +import javax.xml.crypto.Data; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class InstancePerformanceTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetInstancePerformance() throws Exception { + InstancePerformance instancePerformance = new InstancePerformance(); + instancePerformance.setBandwidth(5); + Date date = new Date(); + instancePerformance.setDate(date); + instancePerformance.setId(123); + instancePerformance.setJobId("123"); + instancePerformance.setMaxBandwidth(123); + instancePerformance.setResourceInstanceId("123"); + + instancePerformance.getBandwidth(); + instancePerformance.getDate(); + instancePerformance.getId(); + instancePerformance.getJobId(); + instancePerformance.getMaxBandwidth(); + instancePerformance.getResourceInstanceId(); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/intent/IntentModelTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/intent/IntentModelTest.java new file mode 100644 index 00000000..b3cf294e --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/intent/IntentModelTest.java @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.intent; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class IntentModelTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetIntentModel() throws Exception { + IntentModel intentModel = new IntentModel(); + intentModel.setActive(123); + intentModel.setCreateTime("2022-02-21"); + intentModel.setFilePath("/opt/dev"); + intentModel.setId(123); + intentModel.setModelName("modelName"); + intentModel.setModelType("type1"); + intentModel.getModelType(); + intentModel.setModelType("ccvpn"); + intentModel.getModelType(); + intentModel.setSize(new Float(1)); + + intentModel.getActive(); + intentModel.getCreateTime(); + intentModel.getFilePath(); + intentModel.getId(); + intentModel.getModelName(); + intentModel.getModelType(); + intentModel.getSize(); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/intent/IntentResultDataTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/intent/IntentResultDataTest.java new file mode 100644 index 00000000..c70036db --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/intent/IntentResultDataTest.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.intent; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class IntentResultDataTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetIntentResultData() throws Exception { + IntentResultData intentResultData = new IntentResultData(); + intentResultData.setCode(123); + intentResultData.setData(new Object()); + intentResultData.setMessage("123"); + + intentResultData.getCode(); + intentResultData.getData(); + intentResultData.getMessage(); + intentResultData.toString(); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/maxAndMinTimeBeanTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/maxAndMinTimeBeanTest.java new file mode 100644 index 00000000..2e53b2db --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/maxAndMinTimeBeanTest.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class maxAndMinTimeBeanTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetmaxAndMinTimeBean() throws Exception { + maxAndMinTimeBean maxAndMinTimeBean1 = new maxAndMinTimeBean(); + maxAndMinTimeBean1.setMaxTime("123"); + maxAndMinTimeBean1.setMinTime("123"); + maxAndMinTimeBean1.getMaxTime(); + maxAndMinTimeBean1.getMinTime(); + + maxAndMinTimeBean maxAndMinTimeBean2 = new maxAndMinTimeBean("123", "123"); + + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/sotn/NetWorkResourceRspTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/NetWorkResourceRspTest.java new file mode 100644 index 00000000..5906b181 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/NetWorkResourceRspTest.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.sotn; + +import java.util.ArrayList; +import java.util.List; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class NetWorkResourceRspTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetNetWorkResourceRsp() throws Exception { + + NetWorkResourceRsp netWorkResourceRsp = new NetWorkResourceRsp(); + List<NetWorkResource> netWorkResourceList = new ArrayList<>(); + netWorkResourceRsp.setNetWorkResourceSkins(netWorkResourceList); + netWorkResourceRsp.getNetWorkResources(); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/sotn/NetWorkResourceTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/NetWorkResourceTest.java new file mode 100644 index 00000000..c8bfa38d --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/NetWorkResourceTest.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.sotn; + +import java.util.ArrayList; +import java.util.List; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class NetWorkResourceTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetNetWorkResource() throws Exception { + + + NetWorkResource netWorkResource = new NetWorkResource(); + netWorkResource.setAaiId("123"); + netWorkResource.setNetworkId("123"); + List<Pnf> pnfs = new ArrayList<>(); + netWorkResource.setPnfs(pnfs); + List<Pinterface> pinterfaceList = new ArrayList<>(); + netWorkResource.setTps(pinterfaceList); + NetWorkResource netWorkResource1 = new NetWorkResource("123", pnfs, pinterfaceList, "123"); + + netWorkResource.getAaiId(); + netWorkResource.getNetworkId(); + netWorkResource.getPnfs(); + netWorkResource.getTps(); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PinterfaceRspTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PinterfaceRspTest.java new file mode 100644 index 00000000..b7c8f889 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PinterfaceRspTest.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.sotn; + +import java.util.ArrayList; +import java.util.List; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class PinterfaceRspTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetPinterfaceRsp() throws Exception { + PinterfaceRsp pinterfaceRsp = new PinterfaceRsp(); + List<Pinterface> pinterfaceList = new ArrayList<>(); + pinterfaceRsp.setPinterfaces(pinterfaceList); + pinterfaceRsp.getPinterfaces(); + + PinterfaceRsp pinterfaceRsp1 = new PinterfaceRsp(pinterfaceList); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PinterfaceTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PinterfaceTest.java new file mode 100644 index 00000000..d292c936 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PinterfaceTest.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.sotn; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class PinterfaceTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetPinterface() throws Exception { + + Pinterface pinterface = new Pinterface(); + pinterface.setInterfaceName("name"); + pinterface.getInterfaceName(); + Pinterface pinterface1 = new Pinterface("name"); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PnfTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PnfTest.java new file mode 100644 index 00000000..15ecb669 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PnfTest.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.sotn; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class PnfTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetPnf() throws Exception { + + Pnf pnf = new Pnf(); + pnf.setPnfName("name"); + pnf.getPnfName(); + Pnf pnf1 = new Pnf("name"); + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PnfsTest.java b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PnfsTest.java new file mode 100644 index 00000000..6d814779 --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/bean/sotn/PnfsTest.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2021 CMCC, Inc. and others. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +package org.onap.usecaseui.server.bean.sotn; + +import java.util.ArrayList; +import java.util.List; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class PnfsTest { + + @Before + public void before() throws Exception { + } + + @After + public void after() throws Exception { + } + + @Test + public void testSetAndGetPnfs() throws Exception { + List<Pnf> pnfList = new ArrayList<>(); + Pnfs pnfs = new Pnfs(pnfList); + pnfs.setPnfs(pnfList); + pnfs.getPnfs(); + + } +} diff --git a/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/json/params.json b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/json/params.json new file mode 100644 index 00000000..8a1ae53a --- /dev/null +++ b/server/src/test/java/org/onap/usecaseui/server/service/nsmf/impl/json/params.json @@ -0,0 +1,214 @@ +{ + "serviceId":"f6168ffa-bece-4ec7-8240-f0889a740564", + "serviceName":"Test020201", + "nstId":"faf5aa48-2dd7-4e52-8956-e53c2e41c9fa", + "nstName":"EmbbNst_O2", + "serviceProfile":{ + "termDensity":"0", + "maxPktSize":"0", + "maxNumberofUEs":"10000", + "survivalTime":"", + "reliability":"", + "latency":"20", + "dLThptPerSlice":"600000000", + "availability":"0.0", + "sNSSAI":"01-1EB5BA40", + "jitter":"10", + "sST":"embb", + "maxNumberofConns":"600000", + "dLThptPerUE":"1000", + "uEMobilityLevel":"stationary", + "uLThptPerUE":"1000", + "pLMNIdList":"", + "coverageAreaTAList":"Beijing;Beijing;HaidianDistrict;WanshouluStreet", + "uLThptPerSlice":"600000000", + "activityFactor":"20", + "resourceSharingLevel":"non-shared" + }, + "suggestNsiId":"a9818122-d985-406f-9964-f1916ce15c48", + "NSTInfo":{ + + }, + "tnBHSliceTaskInfo":{ + "suggestNssiId":"e50ad430-9241-4d94-a4bc-6ad2dcb0a4a4", + "progress":"100", + "status":"finished", + "statusDescription":"Allocated TN NSSI successfully", + "sliceProfile":{ + "sliceProfileId":"fec94836-87a0-41dc-a199-0ad9aa3890d1", + "sNSSAIList":"01-1EB5BA40", + "pLMNIdList":"", + "maxNumberOfUEs":0, + "coverageAreaTAList":"", + "latency":10, + "ueMobilityLevel":"", + "resourceSharingLevel":"", + "maxBandwidth":1000, + "sST":"", + "activityFactor":0, + "survivalTime":"", + "expDataRateUL":0, + "expDataRateDL":0, + "areaTrafficCapUL":0, + "areaTrafficCapDL":0, + "jitter":0, + "csAvailabilityTarget":0, + "expDataRate":0, + "maxNumberOfPDUSession":0, + "overallUserDensity":0, + "csReliabilityMeanTime":"", + "msgSizeByte":"", + "transferIntervalTarget":"", + "ipAddress":"", + "logicInterfaceId":"", + "nextHopInfo":"" + }, + "NSSTInfo":{ + + } + }, + "tnMHSliceTaskInfo":{ + "sliceProfile":{ + "sliceProfileId":"", + "sNSSAIList":"", + "pLMNIdList":"", + "maxNumberOfUEs":0, + "coverageAreaTAList":"", + "latency":0, + "ueMobilityLevel":"", + "resourceSharingLevel":"", + "maxBandwidth":0, + "sST":"", + "activityFactor":0, + "survivalTime":"", + "expDataRateUL":0, + "expDataRateDL":0, + "areaTrafficCapUL":0, + "areaTrafficCapDL":0, + "jitter":0, + "csAvailabilityTarget":0, + "expDataRate":0, + "maxNumberOfPDUSession":0, + "overallUserDensity":0, + "csReliabilityMeanTime":"", + "msgSizeByte":"", + "transferIntervalTarget":"", + "ipAddress":"", + "logicInterfaceId":"", + "nextHopInfo":"" + }, + "NSSTInfo":{ + + } + }, + "tnFHSliceTaskInfo":{ + "sliceProfile":{ + "sliceProfileId":"", + "sNSSAIList":"", + "pLMNIdList":"", + "maxNumberOfUEs":0, + "coverageAreaTAList":"", + "latency":0, + "ueMobilityLevel":"", + "resourceSharingLevel":"", + "maxBandwidth":0, + "sST":"", + "activityFactor":0, + "survivalTime":"", + "expDataRateUL":0, + "expDataRateDL":0, + "areaTrafficCapUL":0, + "areaTrafficCapDL":0, + "jitter":0, + "csAvailabilityTarget":0, + "expDataRate":0, + "maxNumberOfPDUSession":0, + "overallUserDensity":0, + "csReliabilityMeanTime":"", + "msgSizeByte":"", + "transferIntervalTarget":"", + "ipAddress":"", + "logicInterfaceId":"", + "nextHopInfo":"" + }, + "NSSTInfo":{ + + } + }, + "cnSliceTaskInfo":{ + "suggestNssiId":"NSSI-C-RHW-HDBNJ-NSSMF-01-A-ZX", + "progress":"100", + "status":"finished", + "statusDescription":"Complete Successfully", + "sliceProfile":{ + "sliceProfileId":"fe3673e2-0ac7-42b0-9feb-2f25a5b7ad8b", + "sNSSAIList":"01-1EB5BA40", + "pLMNIdList":"39-00", + "maxNumberOfUEs":10000, + "coverageAreaTAList":"", + "latency":5, + "ueMobilityLevel":"stationary", + "resourceSharingLevel":"non-shared", + "maxBandwidth":0, + "sST":"", + "activityFactor":20, + "survivalTime":"", + "expDataRateUL":0, + "expDataRateDL":0, + "areaTrafficCapUL":0, + "areaTrafficCapDL":0, + "jitter":0, + "csAvailabilityTarget":0, + "expDataRate":0, + "maxNumberOfPDUSession":0, + "overallUserDensity":0, + "csReliabilityMeanTime":"", + "msgSizeByte":"", + "transferIntervalTarget":"", + "ipAddress":"10.2.3.4", + "logicInterfaceId":"12", + "nextHopInfo":"networkId-providerId-10-clientId-0-topologyId-2-nodeId-10.1.1.1-ltpId-512" + }, + "NSSTInfo":{ + + } + }, + "anSliceTaskInfo":{ + "suggestNssiId":"de0fdc469af84db3bc74b9abeac20e32", + "progress":"100", + "status":"finished", + "statusDescription":"Finished", + "sliceProfile":{ + "sliceProfileId":"25f1d99c-c6e0-41b3-8a6f-1d30418318f0", + "sNSSAIList":"01-1EB5BA40", + "pLMNIdList":"39-00", + "maxNumberOfUEs":10000, + "coverageAreaTAList":"Beijing;Beijing;Haidian District|Beijing;Beijing;Xicheng District|Beijing;Beijing;Changping District", + "latency":5, + "ueMobilityLevel":"stationary", + "resourceSharingLevel":"non-shared", + "maxBandwidth":0, + "sST":"", + "activityFactor":20, + "survivalTime":"", + "expDataRateUL":0, + "expDataRateDL":0, + "areaTrafficCapUL":0, + "areaTrafficCapDL":0, + "jitter":0, + "csAvailabilityTarget":0, + "expDataRate":0, + "maxNumberOfPDUSession":0, + "overallUserDensity":0, + "csReliabilityMeanTime":"", + "msgSizeByte":"", + "transferIntervalTarget":"", + "ipAddress":"10.2.3.4", + "logicInterfaceId":"12", + "nextHopInfo":"networkId-providerId-10-clientId-0-topologyId-2-nodeId-10.1.1.1-ltpId-512" + }, + "NSSTInfo":{ + + } + } +}
\ No newline at end of file |