aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap
diff options
context:
space:
mode:
authorniranjana <niranjana.y60@wipro.com>2020-02-20 15:14:34 +0530
committerniranjana <niranjana.y60@wipro.com>2020-02-20 17:52:48 +0530
commit4df89dfce2ef6ad2a0d28e8750822c594529ae25 (patch)
treeddb160ae43b5d1bc5e1a3174a64026c227477a50 /src/test/java/org/onap
parent8e924858d792abf90c689d65ec89daa67ed72298 (diff)
Implement adaptive SON functionality
Issue-ID: DCAEGEN2-2023 Signed-off-by: niranjana <niranjana.y60@wipro.com> Change-Id: I419b04f669f0b021396a4b04f11139eb4918de09
Diffstat (limited to 'src/test/java/org/onap')
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java9
-rw-r--r--src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java9
2 files changed, 11 insertions, 7 deletions
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java
index b597311..5ea56ea 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/child/StateOofTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@ package org.onap.dcaegen2.services.sonhms.child;
import static org.junit.Assert.assertNotNull;
import java.util.ArrayList;
+import java.util.List;
import java.util.UUID;
import java.util.concurrent.LinkedBlockingQueue;
@@ -62,18 +63,20 @@ public class StateOofTest {
@Test
public void triggerOofTest() {
ArrayList<String> cellList = new ArrayList<>();
+ List<String> fixedPciCells = new ArrayList<>();
+
cellList.add("cell1");
PowerMockito.mockStatic(OofRestClient.class);
try {
PowerMockito.when(OofRestClient.queryOof(Mockito.anyInt(), Mockito.anyString(), Mockito.anyString(), Mockito.anyList(),
- Mockito.anyString(), Mockito.anyList(), Mockito.anyList())).thenReturn("oofResponse");
+ Mockito.anyString(), Mockito.anyList(), Mockito.anyList(), Mockito.any())).thenReturn("oofResponse");
} catch (OofNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
- transactionId = oof.triggerOof(cellList, "networkId", new ArrayList<>());
+ transactionId = oof.triggerOof(cellList, "networkId", new ArrayList<>(),fixedPciCells);
} catch (OofNotFoundException | InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
diff --git a/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java b/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java
index 8c1168b..9e79dcb 100644
--- a/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/sonhms/restclient/OofRestClientTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019 Wipro Limited.
+ * Copyright (C) 2019-2020 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -86,7 +86,8 @@ public class OofRestClientTest {
cellIdList.add("EXP001");
List<String> optimizers=new ArrayList<String>();
optimizers.add("pci");
- List<AnrInput> anrInputList = new ArrayList<>();
+ List<AnrInput> anrInputList = new ArrayList<>();
+ List<String> fixedPciCells = new ArrayList<>();
PowerMockito.mockStatic(SonHandlerRestTemplate.class);
PowerMockito.mockStatic(Configuration.class);
@@ -97,7 +98,7 @@ public class OofRestClientTest {
try {
- String result=OofRestClient.queryOof(1, "xxx-xxx-xxxx", "create", cellIdList, "NTWK005", optimizers, anrInputList);
+ String result=OofRestClient.queryOof(1, "xxx-xxx-xxxx", "create", cellIdList, "NTWK005", optimizers, anrInputList,fixedPciCells);
assertEquals(ResponseEntity.ok(responseBody).getBody(), result);
@@ -109,7 +110,7 @@ public class OofRestClientTest {
.thenReturn(null);
try {
- OofRestClient.queryOof(1, "xxx-xxx-xxxx", "create", cellIdList, "NTWK005", optimizers, new ArrayList<>());
+ OofRestClient.queryOof(1, "xxx-xxx-xxxx", "create", cellIdList, "NTWK005", optimizers, new ArrayList<>(),fixedPciCells);
} catch (OofNotFoundException e) {
// TODO Auto-generated catch block