Code coverage should be at least 55% (SslProtocolSocketFactory class) 57/111557/1
authorsekharhuawei <reddi.shekhar@huawei.com>
Fri, 21 Aug 2020 15:22:31 +0000 (20:52 +0530)
committersekharhuawei <reddi.shekhar@huawei.com>
Fri, 21 Aug 2020 15:22:31 +0000 (20:52 +0530)
Issue-ID: VFC-1726

Signed-off-by: sekharhuawei <reddi.shekhar@huawei.com>
Change-Id: I43940c79b1eb7a58777a3b51a788d1c5b5e68411

huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslProtocolSocketFactoryTest.java

index 27236ca..bd70120 100644 (file)
 
 package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.csm.connect;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
 import org.junit.Test;
 import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.VnfmException;
-import org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.csm.connect.SslProtocolSocketFactory;
 
 public class SslProtocolSocketFactoryTest {
 
@@ -45,4 +45,16 @@ public class SslProtocolSocketFactoryTest {
         SslProtocolSocketFactory.getInstance().refresh("Anonymous");
         assertTrue(true);
     }
+    @Test
+    public void getAnonymousTest() throws VnfmException{
+       String authenticateMode="Anonymous";
+        SslProtocolSocketFactory.getInstance().get(authenticateMode);
+        assertTrue(true);
+    }
+    @Test
+    public void getCertificateTest() throws VnfmException{
+       String authenticateMode="Certificate";
+        SslProtocolSocketFactory.getInstance().get(authenticateMode);
+        assertTrue(true);
+    }
 }