diff options
author | yashwanth <gandhapu.yashwanth@wipro.com> | 2021-04-25 23:42:58 -0700 |
---|---|---|
committer | yashwanth <gandhapu.yashwanth@wipro.com> | 2021-04-26 21:32:50 -0700 |
commit | 959c9cf80775c4b1e5d78f299a441ce9fe9bd9d3 (patch) | |
tree | 707d64d01adaac8e0c38cd7de60fdf8fe605ae38 /ransim/ransimctrlr/RANSIM-CTRLR/src/test | |
parent | be0bc4456438b1be97105fec3f85f79a66403558 (diff) |
TrackingArea Type change
Issue-ID: INT-1913
Signed-off-by: yashwanth <gandhapu.yashwanth@wipro.com>
Change-Id: Iba23a9dcee04a1c8604f88e7cc3bae795a9410ff
Diffstat (limited to 'ransim/ransimctrlr/RANSIM-CTRLR/src/test')
-rw-r--r-- | ransim/ransimctrlr/RANSIM-CTRLR/src/test/java/org/onap/ransim/rest/api/services/TestRANSliceConfigServices.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/test/java/org/onap/ransim/rest/api/services/TestRANSliceConfigServices.java b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/java/org/onap/ransim/rest/api/services/TestRANSliceConfigServices.java index 3ffea5b..70d3eed 100644 --- a/ransim/ransimctrlr/RANSIM-CTRLR/src/test/java/org/onap/ransim/rest/api/services/TestRANSliceConfigServices.java +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/java/org/onap/ransim/rest/api/services/TestRANSliceConfigServices.java @@ -137,7 +137,7 @@ public class TestRANSliceConfigServices { public void testSaveNearRTRIC() { NearRTRICModel nearRTRIC = new NearRTRICModel(); String input = - "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":[\"Kingston\"],\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; + "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":101,\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; try { nearRTRIC = objectMapper.readValue(input, NearRTRICModel.class); } catch (Exception e) { @@ -152,7 +152,7 @@ public class TestRANSliceConfigServices { public void testFetchNearRTRICData() { int nearRTRICId = 11; String response = - "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":[\"Kingston\"],\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; + "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":101,\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; NearRTRICModel nearRTRIC = new NearRTRICModel(); try { nearRTRIC = objectMapper.readValue(response, NearRTRICModel.class); @@ -166,10 +166,10 @@ public class TestRANSliceConfigServices { @Test public void testFindRICsInTA() { - String nSSAI = "01-000100"; + int trackingArea = 101; List<NearRTRICModel> ricsList = new ArrayList<>(); String ricModel = - "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":[\"Kingston\"],\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; + "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":101,\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; NearRTRICModel nearRTRIC = new NearRTRICModel(); try { nearRTRIC = objectMapper.readValue(ricModel, NearRTRICModel.class); @@ -178,8 +178,8 @@ public class TestRANSliceConfigServices { e.printStackTrace(); } ricsList.add(nearRTRIC); - Mockito.doReturn(ricsList).when(rANSliceConfigService).findRICsInTA(Mockito.anyString()); - assertEquals(ricsList, rANSliceConfigService.findRICsInTA(nSSAI)); + Mockito.doReturn(ricsList).when(rANSliceConfigService).findRICsInTA(Mockito.anyInt()); + assertEquals(ricsList, rANSliceConfigService.findRICsInTA(trackingArea)); } @Test @@ -189,7 +189,7 @@ public class TestRANSliceConfigServices { cellIds.add(45785); List<NearRTRICModel> ricsList = new ArrayList<>(); String ricModel = - "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":[\"Kingston\"],\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; + "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":101,\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; NearRTRICModel nearRTRIC = new NearRTRICModel(); try { nearRTRIC = objectMapper.readValue(ricModel, NearRTRICModel.class); @@ -235,11 +235,11 @@ public class TestRANSliceConfigServices { @Test public void testFetchCellsofTA() { - String trackingArea = "Kingston"; + int trackingArea = 202; List<String> cellIds = new ArrayList<String>(); cellIds.add("23456"); cellIds.add("45785"); - Mockito.doReturn(cellIds).when(rANSliceConfigService).fetchCellsofTA(Mockito.anyString()); + Mockito.doReturn(cellIds).when(rANSliceConfigService).fetchCellsofTA(Mockito.anyInt()); assertEquals(cellIds, rANSliceConfigService.fetchCellsofTA(trackingArea)); } @@ -264,7 +264,7 @@ public class TestRANSliceConfigServices { String ranNFNSSIID = "11"; List<NearRTRICModel> ricsList = new ArrayList<>(); String ricModel = - "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":[\"Kingston\"],\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; + "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":101,\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; NearRTRICModel nearRTRIC = new NearRTRICModel(); try { nearRTRIC = objectMapper.readValue(ricModel, NearRTRICModel.class); @@ -282,7 +282,7 @@ public class TestRANSliceConfigServices { String sNSSAI = "001-00001"; List<NearRTRICModel> ricsList = new ArrayList<>(); String ricModel = - "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":[\"Kingston\"],\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; + "{\"nearRTRICId\":11,\"gNBId\":98763,\"trackingArea\":101,\"resourceType\":\"NearRTRIC\",\"ranNFNSSIList\":[\"11\",\"22\"],\"pLMNInfoList\":[{\"pLMNId\":\"310-410\",\"sNSSAI\":{\"sNSSAI\":\"001-003\",\"status\":\"ACTIVE\",\"configData\":{\"dLThptPerSlice\":55,\"uLThptPerSlice\":40}}}]}"; NearRTRICModel nearRTRIC = new NearRTRICModel(); try { nearRTRIC = objectMapper.readValue(ricModel, NearRTRICModel.class); |