diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-08-09 16:06:42 +0530 |
---|---|---|
committer | Tian Lee <TianL@amdocs.com> | 2018-08-15 08:53:58 +0000 |
commit | 81fe18321578aeb0c66d339802ab7b1472ebdb63 (patch) | |
tree | 7d6af28e20a1154a8f4879854976d4014507aa01 /src/test | |
parent | 6d1ca7d232210e9477a6c6040317738eb63dd809 (diff) |
added test case to RestfulClientTest.java
to increase code coverage
Issue-ID: AAI-1451
Change-Id: I76a8a3a84b3218b038fda2a240d121481f64a03a
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/onap/aai/restclient/client/RestfulClientTest.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/test/java/org/onap/aai/restclient/client/RestfulClientTest.java b/src/test/java/org/onap/aai/restclient/client/RestfulClientTest.java index 1f528ae..e2a728d 100644 --- a/src/test/java/org/onap/aai/restclient/client/RestfulClientTest.java +++ b/src/test/java/org/onap/aai/restclient/client/RestfulClientTest.java @@ -2,6 +2,7 @@ * ============LICENSE_START=========================================================================================== * Copyright (c) 2017 AT&T Intellectual Property. * Copyright (c) 2017 Amdocs + * Modification Copyright (c) 2018 IBM. * All rights reserved. * ===================================================================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with @@ -21,6 +22,7 @@ package org.onap.aai.restclient.client; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -336,6 +338,13 @@ public class RestfulClientTest { } + @Test + public void testGetClient() throws Exception { + RestClientBuilder restClientBuilder= new RestClientBuilder(); + restClientBuilder.setAuthenticationMode(RestAuthenticationMode.SSL_BASIC); + assertTrue(restClientBuilder.getClient() instanceof Client); + } + /** * Specify the status code of the response object returned by the mocked client * @@ -362,5 +371,4 @@ public class RestfulClientTest { return new RestClient(mockClientBuilder).authenticationMode(RestAuthenticationMode.SSL_CERT) .connectTimeoutMs(1000).readTimeoutMs(500).clientCertFile("cert").clientCertPassword("password"); } - } |