From 6fdf2fd8d754e59977bf107d60725b8394771f69 Mon Sep 17 00:00:00 2001 From: AvinashS Date: Wed, 30 Aug 2017 12:12:47 +0530 Subject: Sonar fixes for ONAP-PAP-REST Critical, Major and minor issues fix. Change-Id: I7ae1ad11602f7d4dfe96c02c666c48057a8de2eb IssueId: POLICY-174 Signed-off-by: AvinashS --- .../rest/controller/DictionaryControllerTest.java | 8 ++++---- .../MicroServiceDictionaryControllerTest.java | 24 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'ONAP-PAP-REST/src/test') diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/DictionaryControllerTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/DictionaryControllerTest.java index 26509b1aa..0eda3fb95 100644 --- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/DictionaryControllerTest.java +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/DictionaryControllerTest.java @@ -111,7 +111,7 @@ public class DictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getAttributeDictionaryEntityDatabyAttributeName(request, response); + controller.getAttributeDictionaryEntityDatabyAttributeName(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("attributeDictionaryDatas")); @@ -129,7 +129,7 @@ public class DictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getAttributeDictionaryEntityData(request, response); + controller.getAttributeDictionaryEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("attributeDictionaryDatas")); @@ -208,7 +208,7 @@ public class DictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getOnapNameDictionaryByNameEntityData(request, response); + controller.getOnapNameDictionaryByNameEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("onapNameDictionaryDatas")); @@ -226,7 +226,7 @@ public class DictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getOnapNameDictionaryEntityData(request, response); + controller.getOnapNameDictionaryEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("onapNameDictionaryDatas")); diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java index e307820e5..dccf3a5a4 100644 --- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryControllerTest.java @@ -138,7 +138,7 @@ public class MicroServiceDictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getDCAEUUIDDictionaryByNameEntityData(request, response); + controller.getDCAEUUIDDictionaryByNameEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("dcaeUUIDDictionaryDatas")); @@ -157,7 +157,7 @@ public class MicroServiceDictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getDCAEUUIDDictionaryEntityData(request, response); + controller.getDCAEUUIDDictionaryEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("dcaeUUIDDictionaryDatas")); @@ -235,7 +235,7 @@ public class MicroServiceDictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getMicroServiceConfigNameByNameDictionaryEntityData(request, response); + controller.getMicroServiceConfigNameByNameDictionaryEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceCongigNameDictionaryDatas")); @@ -253,7 +253,7 @@ public class MicroServiceDictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getMicroServiceConfigNameDictionaryEntityData(request, response); + controller.getMicroServiceConfigNameDictionaryEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceCongigNameDictionaryDatas")); @@ -332,7 +332,7 @@ public class MicroServiceDictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getMicroServiceLocationByNameDictionaryEntityData(request, response); + controller.getMicroServiceLocationByNameDictionaryEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas")); @@ -350,7 +350,7 @@ public class MicroServiceDictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getMicroServiceLocationDictionaryEntityData(request, response); + controller.getMicroServiceLocationDictionaryEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceLocationDictionaryDatas")); @@ -429,7 +429,7 @@ public class MicroServiceDictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getMicroServiceAttributeByNameDictionaryEntityData(request, response); + controller.getMicroServiceAttributeByNameDictionaryEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas")); @@ -447,7 +447,7 @@ public class MicroServiceDictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getMicroServiceAttributeDictionaryEntityData(request, response); + controller.getMicroServiceAttributeDictionaryEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceAttributeDictionaryDatas")); @@ -525,7 +525,7 @@ public class MicroServiceDictionaryControllerTest { MockHttpServletResponse response = new MockHttpServletResponse(); - controller.getMicroServiceModelsDictionaryByNameEntityData(request, response); + controller.getMicroServiceModelsDictionaryByNameEntityData(response); try { assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas")); @@ -574,7 +574,7 @@ public class MicroServiceDictionaryControllerTest { try { // mock the getReader() call when(request.getReader()).thenReturn(br); - controller.getMicroServiceModelsDictionaryEntityData(request, response); + controller.getMicroServiceModelsDictionaryEntityData(response); logger.info("response.getContentAsString(): " + response.getContentAsString()); assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas")); @@ -598,7 +598,7 @@ public class MicroServiceDictionaryControllerTest { try { // mock the getReader() call when(request.getReader()).thenReturn(br); - controller.getMicroServiceModelsDictionaryEntityDataServiceVersion(request, response); + controller.getMicroServiceModelsDictionaryEntityDataServiceVersion(response); logger.info("response.getContentAsString(): " + response.getContentAsString()); assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryDatas")); @@ -622,7 +622,7 @@ public class MicroServiceDictionaryControllerTest { try { // mock the getReader() call when(request.getReader()).thenReturn(br); - controller.getMicroServiceModelsDictionaryClassEntityData(request, response); + controller.getMicroServiceModelsDictionaryClassEntityData(response); logger.info("response.getContentAsString(): " + response.getContentAsString()); assertTrue( response.getContentAsString() != null && response.getContentAsString().contains("microServiceModelsDictionaryClassDatas")); -- cgit 1.2.3-korg