summaryrefslogtreecommitdiffstats
path: root/ResmanagementService/service/src/test
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-09-11 16:07:56 -0700
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-09-11 16:12:27 -0700
commitc5041675a30f1102daec55d08564b544b9a2071d (patch)
treef3305c621cd69793bbdbce2b891f2167cefaffe2 /ResmanagementService/service/src/test
parent89b20536425441a464d4832667abae80a6cd818f (diff)
Fix some Sonar issues in common util directory
This patch fixes some Sonar issues in common/util directory. Change-Id: I76ae980a3abb1d8a16d0197654cd9d759b13d597 Issue-Id: VFC-331 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'ResmanagementService/service/src/test')
-rw-r--r--ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/JsonUtilTest.java7
-rw-r--r--ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/response/ResponseUtilTest.java4
2 files changed, 5 insertions, 6 deletions
diff --git a/ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/JsonUtilTest.java b/ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/JsonUtilTest.java
index 1f7c8a1..13a3ca6 100644
--- a/ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/JsonUtilTest.java
+++ b/ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/JsonUtilTest.java
@@ -24,7 +24,6 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import org.junit.Test;
-import org.onap.vfc.nfvo.resmanagement.common.util.JsonUtil;
import mockit.Mock;
import mockit.MockUp;
@@ -299,7 +298,7 @@ public class JsonUtilTest {
jsonObj.put("a", "1");
jsonObj.put("b", "2");
String parentKey = "";
- String result = JsonUtil.getStrValueByJson(jsonObj, parentKey, key);
+ String result = JsonUtil.getStrValueByParentJson(jsonObj, parentKey, key);
String expectedResult = "1";
assertEquals(expectedResult, result);
}
@@ -318,7 +317,7 @@ public class JsonUtilTest {
return new JSONObject();
}
};
- String result = JsonUtil.getStrValueByJson(jsonObj, parentKey, key);
+ String result = JsonUtil.getStrValueByParentJson(jsonObj, parentKey, key);
String expectedResult = null;
assertEquals(expectedResult, result);
}
@@ -330,7 +329,7 @@ public class JsonUtilTest {
jsonObj.put("a", "1");
jsonObj.put("b", "2");
String parentKey = "b";
- String result = JsonUtil.getStrValueByJson(jsonObj, parentKey, key);
+ String result = JsonUtil.getStrValueByParentJson(jsonObj, parentKey, key);
String expectedResult = null;
assertEquals(expectedResult, result);
}
diff --git a/ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/response/ResponseUtilTest.java b/ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/response/ResponseUtilTest.java
index a62e61e..159bdcf 100644
--- a/ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/response/ResponseUtilTest.java
+++ b/ResmanagementService/service/src/test/java/org/onap/vfc/nfvo/resmanagement/common/util/response/ResponseUtilTest.java
@@ -57,7 +57,7 @@ public class ResponseUtilTest {
int httpStatusCode = -1;
int retCode1 = -1;
String msg1 = "123";
- JSONObject result = ResponseUtil.genHttpResponse(null, httpStatusCode, retCode1, msg1);
+ JSONObject result = ResponseUtil.genHttpResponse(httpStatusCode, retCode1, msg1);
JSONObject expectedResult = new JSONObject();
expectedResult.put("msg", "123");
assertEquals(result.toString(), expectedResult.toString());
@@ -73,7 +73,7 @@ public class ResponseUtilTest {
map.put("a", -1);
map.put("b", 1);
String msg1 = "123";
- JSONObject result = ResponseUtil.genHttpResponse(null, codeMap, msg1, map);
+ JSONObject result = ResponseUtil.genHttpResponse(codeMap, msg1, map);
JSONObject expectedResult = new JSONObject();
expectedResult.put("msg", "123");
expectedResult.put("a", "-1");