diff options
Diffstat (limited to 'examples/examples-onap-bbs/src/test')
-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)); } } |