From af2d592ebbb96d5f5f55f7322f9ecdfdccfce64e Mon Sep 17 00:00:00 2001 From: Instrumental Date: Wed, 29 Aug 2018 12:47:32 -0500 Subject: Change CadiFilter Default SSetter Issue-ID: AAF-460 Change-Id: I1f7d52104eb36c35cca3264b4995342936e69ef6 Signed-off-by: Instrumental --- .../onap/aaf/cadi/http/test/JU_HBasicAuthSS.java | 1 + .../org/onap/aaf/cadi/http/test/JU_HX509SS.java | 22 +++++++++------------- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'cadi/client/src/test/java') diff --git a/cadi/client/src/test/java/org/onap/aaf/cadi/http/test/JU_HBasicAuthSS.java b/cadi/client/src/test/java/org/onap/aaf/cadi/http/test/JU_HBasicAuthSS.java index 1b9f6c3a..fa0a673f 100644 --- a/cadi/client/src/test/java/org/onap/aaf/cadi/http/test/JU_HBasicAuthSS.java +++ b/cadi/client/src/test/java/org/onap/aaf/cadi/http/test/JU_HBasicAuthSS.java @@ -35,6 +35,7 @@ import org.onap.aaf.cadi.PropAccess; import org.onap.aaf.cadi.config.Config; import org.onap.aaf.cadi.config.SecurityInfoC; import org.onap.aaf.cadi.http.HBasicAuthSS; +import org.onap.aaf.cadi.http.HSecurityInfoInit; import org.onap.aaf.cadi.principal.BasicPrincipal; public class JU_HBasicAuthSS { diff --git a/cadi/client/src/test/java/org/onap/aaf/cadi/http/test/JU_HX509SS.java b/cadi/client/src/test/java/org/onap/aaf/cadi/http/test/JU_HX509SS.java index 0c086e4b..b57f29e0 100644 --- a/cadi/client/src/test/java/org/onap/aaf/cadi/http/test/JU_HX509SS.java +++ b/cadi/client/src/test/java/org/onap/aaf/cadi/http/test/JU_HX509SS.java @@ -21,6 +21,10 @@ package org.onap.aaf.cadi.http.test; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; +import static org.mockito.Mockito.when; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; @@ -32,12 +36,10 @@ import java.security.cert.X509Certificate; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.X509KeyManager; -import static org.junit.Assert.*; -import static org.mockito.Mockito.*; -import static org.hamcrest.CoreMatchers.*; - -import org.junit.*; -import org.mockito.*; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; import org.onap.aaf.cadi.CadiException; import org.onap.aaf.cadi.PropAccess; import org.onap.aaf.cadi.config.Config; @@ -75,7 +77,7 @@ public class JU_HX509SS { access = new PropAccess(new PrintStream(new ByteArrayOutputStream()), new String[0]); access.setProperty(Config.CADI_ALIAS, alias); - si = SecurityInfoC.instance(access, HttpURLConnection.class); + // si = SecurityInfoC.instance(access, HttpURLConnectionStub.class); } @Test @@ -105,12 +107,6 @@ public class JU_HX509SS { HX509SS x509 = new HX509SS(siMock); } - @Test(expected = APIException.class) - public void throws2Test() throws APIException, CadiException { - @SuppressWarnings("unused") - HX509SS x509 = new HX509SS(si, false); - } - @Test(expected = APIException.class) public void throws3Test() throws APIException, CadiException { when(keyManagerMock.getCertificateChain(alias)).thenReturn(new X509Certificate[0]); -- cgit 1.2.3-korg