diff options
author | ramya <ramya.ravichandran5@wipro.com> | 2019-03-11 17:34:41 +0530 |
---|---|---|
committer | ramya <ramya.ravichandran5@wipro.com> | 2019-03-11 17:37:12 +0530 |
commit | 3cd4023832810e8b65f85a9db807c8bafec38d82 (patch) | |
tree | 13175e409ca3b29eccffacd75538ded25cfdb518 /src/test/java/com/wipro/www/sonhms/model | |
parent | 79f9e63b3e531ae7ca4eaa7224ab8a740ad578cb (diff) |
code coverage for M3
Change-Id: Ib421ce2ac9357a3210d99293497f9e304f8cd2f5
Issue-ID: DCAEGEN2-1259
Signed-off-by: Ramya Ravichandran<ramya.ravichandran5@wipro.com>
Diffstat (limited to 'src/test/java/com/wipro/www/sonhms/model')
6 files changed, 0 insertions, 353 deletions
diff --git a/src/test/java/com/wipro/www/sonhms/model/CellConfigTest.java b/src/test/java/com/wipro/www/sonhms/model/CellConfigTest.java deleted file mode 100644 index 68f8b40..0000000 --- a/src/test/java/com/wipro/www/sonhms/model/CellConfigTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * ============LICENSE_START======================================================= - * pcims - * ================================================================================ - * Copyright (C) 2018 Wipro Limited. - * ============================================================================== - * 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. - * ============LICENSE_END========================================================= - ******************************************************************************/ - -package com.wipro.www.sonhms.model; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -public class CellConfigTest { - - @Test - public void cellConfigTest() { - - Common common = new Common(); - common.setCellIdentity("cellIdentity"); - Ran ran = new Ran(); - ran.setCommon(common); - Lte lte = new Lte(); - lte.setRan(ran); - CellConfig cellConfig = new CellConfig(); - cellConfig.setLte(lte); - assertEquals(lte, cellConfig.getLte()); - assertEquals(ran, lte.getRan()); - assertEquals(common, ran.getCommon()); - } -} diff --git a/src/test/java/com/wipro/www/sonhms/model/CellNeighbourListTest.java b/src/test/java/com/wipro/www/sonhms/model/CellNeighbourListTest.java deleted file mode 100644 index 8acc0e8..0000000 --- a/src/test/java/com/wipro/www/sonhms/model/CellNeighbourListTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * ============LICENSE_START======================================================= - * pcims - * ================================================================================ - * Copyright (C) 2018 Wipro Limited. - * ============================================================================== - * 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. - * ============LICENSE_END========================================================= - ******************************************************************************/ - -package com.wipro.www.sonhms.model; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -public class CellNeighbourListTest { - - @Test - public void cellNeighbourListTest() { - CellNeighbourList cellNeighbourList = new CellNeighbourList(); - cellNeighbourList.setCellId("cellId"); - cellNeighbourList.setNeighbours("neighbour"); - cellNeighbourList.setPhysicalCellId(1); - assertEquals("cellId",cellNeighbourList.getCellId() ); - assertEquals("neighbour",cellNeighbourList.getNeighbours() ); - assertEquals(1,cellNeighbourList.getPhysicalCellId() ); - - } - -} diff --git a/src/test/java/com/wipro/www/sonhms/model/NotificationPayloadTest.java b/src/test/java/com/wipro/www/sonhms/model/NotificationPayloadTest.java deleted file mode 100644 index d1134fa..0000000 --- a/src/test/java/com/wipro/www/sonhms/model/NotificationPayloadTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * ============LICENSE_START======================================================= - * pcims - * ================================================================================ - * Copyright (C) 2018 Wipro Limited. - * ============================================================================== - * 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. - * ============LICENSE_END========================================================= - ******************************************************************************/ - -package com.wipro.www.sonhms.model; - -import org.junit.Test; - -public class NotificationPayloadTest { - - @Test - public void notificationPayloadTest() { - - } - -} diff --git a/src/test/java/com/wipro/www/sonhms/model/NotificationTest.java b/src/test/java/com/wipro/www/sonhms/model/NotificationTest.java deleted file mode 100644 index 09c6c0a..0000000 --- a/src/test/java/com/wipro/www/sonhms/model/NotificationTest.java +++ /dev/null @@ -1,127 +0,0 @@ -/******************************************************************************* - * ============LICENSE_START======================================================= - * pcims - * ================================================================================ - * Copyright (C) 2018 Wipro Limited. - * ============================================================================== - * 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. - * ============LICENSE_END========================================================= - ******************************************************************************/ - -package com.wipro.www.sonhms.model; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; - -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.wipro.www.sonhms.model.FapServiceList; -import com.wipro.www.sonhms.model.LteNeighborListInUseLteCell; -import com.wipro.www.sonhms.model.NeighborListInUse; -import com.wipro.www.sonhms.model.Notification; -import com.wipro.www.sonhms.model.NotificationCellConfig; -import com.wipro.www.sonhms.model.NotificationLte; -import com.wipro.www.sonhms.model.NotificationPayload; -import com.wipro.www.sonhms.model.NotificationRan; -import com.wipro.www.sonhms.model.RadioAccess; -import com.wipro.www.sonhms.model.X0005b9Lte; - -import java.io.IOException; -import java.util.ArrayList; - -import org.junit.Test; - -public class NotificationTest { - - @Test - public void notificationTest() { - - Notification notif = new Notification(); - LteNeighborListInUseLteCell lteNeighborListInUseLteCell = new LteNeighborListInUseLteCell("pnf1", "true", - "Cell10", "true", "123456", "5", 22, "false"); - - ArrayList<LteNeighborListInUseLteCell> list = new ArrayList<>(); - list.add(lteNeighborListInUseLteCell); - - NeighborListInUse neighborListInUse = new NeighborListInUse(list, "1"); - - NotificationRan notificationRan = new NotificationRan(neighborListInUse, "Cell25"); - NotificationLte notificationLte = new NotificationLte(notificationRan); - NotificationCellConfig notificationCell = new NotificationCellConfig(notificationLte); - X0005b9Lte lte = new X0005b9Lte(126, "pnf2"); - FapServiceList fap = new FapServiceList("Cell1", lte, notificationCell); - - ArrayList<FapServiceList> al = new ArrayList<>(); - al.add(fap); - - RadioAccess radioAccess = new RadioAccess("1", al); - NotificationPayload payload = new NotificationPayload(radioAccess); - - notif.setRequestId("9d2d790e-a5f0-11e8-98d0-529269fb1459"); - notif.setAai("{}"); - notif.setAction("NeighborListModified"); - notif.setFrom("SDNR"); - notif.setVersion("1.0.2"); - notif.setPayload(payload); - assertNotEquals("159", notif.getRequestId()); - - String test = "{\n" + " \"requestID\": \"9d2d790e-a5f0-11e8-98d0-529269fb1459\",\n" + " \"AAI\": {},\n" - + " \"from\": \"SDNR\",\n" + " \"version\": \"1.0.2\",\n" - + " \"Action\": \"NeighborListModified\",\n" + " \"Payload\": {\n" + "\n" + " \"RadioAccess\":{ \n" - + " \"FAPServiceNumberOfEntries\":\"2\",\n" + " \"FAPServiceList\":[ \n" + " { \n" - + " \"alias\":\"Cell1\",\n" + " \"X0005b9Lte\":{ \n" - + " \"phyCellIdInUse\":\"35\",\n" + " \"pnfName\":\"DU-1\"\n" - + " },\n" + " \"CellConfig\":{ \n" + " \"LTE\":{ \n" - + " \"RAN\":{ \n" + " \"CellIdentity\":\"Cell1\",\n" - + " \"NeighborListInUse\":{ \n" - + " \"LTECellNumberOfEntries\":\"2\",\n" - + " \"LTENeighborListInUseLTECell\":[ \n" + " { \n" - + " \"pnfName\":\"DU-2\",\n" - + " \"enable\":\"true\",\n" - + " \"alias\":\"Cell10\",\n" - + " \"mustInclude\":\"true\",\n" - + " \"plmnid\":\"123456\",\n" - + " \"cid\":\"2\",\n" - + " \"phyCellId\":\"22\",\n" - + " \"blacklisted\":\"false\"\n" + " },\n" - + " { \n" + " \"pnfName\":\"DU-3\",\n" - + " \"enable\":\"true\",\n" - + " \"alias\":\"Cell15\",\n" - + " \"mustInclude\":\"true\",\n" - + " \"plmnid\":\"123456\",\n" - + " \"cid\":\"5\",\n" - + " \"phyCellId\":\"24\",\n" - + " \"blacklisted\":\"false\"\n" + " }\n" - + " ]\n" + " }\n" + " }\n" - + " }\n" + " }\n" + " }\n" + " ]\n" + " }\n" + "}\n" + "}"; - - ObjectMapper mapper = new ObjectMapper(); - Notification notif1 = new Notification(); - try { - notif1 = mapper.readValue(test, Notification.class); - } catch (JsonParseException e) { - e.printStackTrace(); - } catch (JsonMappingException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - - assertNotEquals(notif, notif1); - assertEquals(notif.getAction(), notif1.getAction()); - assertEquals(notif.getAai().toString(), notif1.getAai().toString()); - - } - -} diff --git a/src/test/java/com/wipro/www/sonhms/model/PayloadTest.java b/src/test/java/com/wipro/www/sonhms/model/PayloadTest.java deleted file mode 100644 index 1c006f9..0000000 --- a/src/test/java/com/wipro/www/sonhms/model/PayloadTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * ============LICENSE_START======================================================= - * pcims - * ================================================================================ - * Copyright (C) 2018 Wipro Limited. - * ============================================================================== - * 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. - * ============LICENSE_END========================================================= - ******************************************************************************/ - -package com.wipro.www.sonhms.model; - -import static org.junit.Assert.assertEquals; - -import com.wipro.www.sonhms.model.CellConfig; -import com.wipro.www.sonhms.model.Common; -import com.wipro.www.sonhms.model.Configurations; -import com.wipro.www.sonhms.model.Data; -import com.wipro.www.sonhms.model.FapService; -import com.wipro.www.sonhms.model.Lte; -import com.wipro.www.sonhms.model.Payload; -import com.wipro.www.sonhms.model.Ran; -import com.wipro.www.sonhms.model.X0005b9Lte; - -import java.util.ArrayList; - -import org.junit.Test; - - - -public class PayloadTest { - - @Test - public void payloadTest() { - Common common = new Common("cell1"); - - Ran ran = new Ran(common); - - Lte lte = new Lte(ran); - - CellConfig cellConfig = new CellConfig(lte); - - X0005b9Lte x0005b9Lte = new X0005b9Lte(0, "pnf2"); - - FapService fapService = new FapService("cell6", x0005b9Lte, cellConfig); - - Data data = new Data(fapService); - - Configurations config = new Configurations(data); - ArrayList<Configurations> al = new ArrayList<>(); - al.add(config); - - Payload payload = new Payload(al); - - assertEquals("pnf2", payload.getConfiguration().get(0).getData().getFapservice().getX0005b9Lte().getPnfName()); - - assertEquals("cell6", payload.getConfiguration().get(0).getData().getFapservice().getAlias()); - - } - -} diff --git a/src/test/java/com/wipro/www/sonhms/model/ResponseTest.java b/src/test/java/com/wipro/www/sonhms/model/ResponseTest.java deleted file mode 100644 index c413791..0000000 --- a/src/test/java/com/wipro/www/sonhms/model/ResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * ============LICENSE_START======================================================= - * pcims - * ================================================================================ - * Copyright (C) 2018 Wipro Limited. - * ============================================================================== - * 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. - * ============LICENSE_END========================================================= - ******************************************************************************/ - -package com.wipro.www.sonhms.model; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -public class ResponseTest { - - @Test - public void respomseTest() { - Response response = new Response(); - response.setCellId("cellId"); - response.setPci(1); - assertEquals("cellId", response.getCellId()); - assertEquals(1, response.getPci()); - } - -} |