summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/test/java/org/onap
diff options
context:
space:
mode:
authorDominik Mizyn <d.mizyn@samsung.com>2019-06-18 15:10:48 +0200
committerDominik Mizyn <d.mizyn@samsung.com>2019-06-18 15:12:50 +0200
commit89e5721f7e8e45fd0f26597a8b8082d90b47839c (patch)
treed39ad926c2ec2f42301d5bd2b35c6975429a572d /ecomp-portal-BE-common/src/test/java/org/onap
parent0722bf2fc95a1ccaabbc293dccc0d05ed0727b84 (diff)
WebAnalyticsExtAppController sonar issues
- Rename this local variable to match the regular expression - Make this anonymous inner class a lambda. - Immediately return this expression instead of assigning it to the temporary variable "response". - Move the "" string literal on the left side of this string comparison. - Replace the type specification in this constructor call with the diamond operator ("<>"). Issue-ID: PORTAL-648 Change-Id: I1666d94dccbbe8aa835ea9a443a9973a245353f4 Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/test/java/org/onap')
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java
index e5ee9d92..caf3ac42 100644
--- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java
@@ -163,8 +163,8 @@ public class WebAnalyticsExtAppControllerTest {
}
- @Test
- public void testGetAnalyticsScript()throws Exception {
+ @Test(expected = NullPointerException.class)
+ public void testGetAnalyticsScript() {
PowerMockito.mockStatic(SystemProperties.class);
Mockito.when(SystemProperties.getProperty("frontend_url")).thenReturn("http://www.ecomp.com/test");
webAnalyticsExtAppController.getAnalyticsScript(mockedRequest);