diff options
author | aditya.puthuparambil <aditya.puthuparambil@est.tech> | 2020-04-14 13:16:07 +0100 |
---|---|---|
committer | aditya.puthuparambil <aditya.puthuparambil@est.tech> | 2020-04-14 13:16:07 +0100 |
commit | 3c40c871d6f0679e60f4d5c825d272af8bbe3148 (patch) | |
tree | ac3df4624f9ddd2bf08ef1ce783e49c1eb4c9af8 /examples/examples-onap-bbs/src/test/java/org | |
parent | 2a3fd3ee6c37314da69f4121019c8d713ace79ae (diff) |
SONAR issue fix
Issue-ID: POLICY-1913
Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
Change-Id: Ie6dccc50ad63c5fdca1e79d7985aec2455041b56
Diffstat (limited to 'examples/examples-onap-bbs/src/test/java/org')
-rw-r--r-- | examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java b/examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java index 3cb588dc7..ba1481c0b 100644 --- a/examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java +++ b/examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java @@ -36,6 +36,7 @@ import org.junit.Test; import org.mockito.Mockito; public class WebClientTest { + HttpsURLConnection mockedHttpsUrlConnection; String sampleString = "Response Code :200"; @@ -55,24 +56,24 @@ public class WebClientTest { @Test public void testHttpsRequest() { WebClient cl = new WebClient(); - String result = - cl.httpRequest("https://some.random.url/data", "POST", null, "admin", "admin", "application/json"); + String result = cl + .httpRequest("https://some.random.url/data", "POST", null, "admin", "admin", "application/json"); assertNotNull(result); } @Test public void testHttpRequest() { WebClient cl = new WebClient(); - String result = - cl.httpRequest("http://some.random.url/data", "GET", null, "admin", "admin", "application/json"); + String result = cl + .httpRequest("http://some.random.url/data", "GET", null, "admin", "admin", "application/json"); assertNotNull(result); } @Test public void testToPrettyString() { String xmlSample = "<input xmlns=\"org:onap:sdnc:northbound:generic-resource\">" - + "<sdnc-request-header> <svc-action>update</svc-action> </sdnc-request-header></input>"; + + "<sdnc-request-header> <svc-action>update</svc-action> </sdnc-request-header></input>"; WebClient cl = new WebClient(); - cl.toPrettyString(xmlSample, 4); + assertNotNull(cl.toPrettyString(xmlSample, 4)); } } |