IT. Expert System.

Android Reference

HttpsURLConnectionTest


org.apache.harmony.luni.tests.internal.net.www.protocol.https

Class HttpsURLConnectionTest

  • java.lang.Object
    • TestCase
      • org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest


  • public class HttpsURLConnectionTest
    extends TestCase
    Implementation independent test for HttpsURLConnection. The test needs certstore file placed in system classpath and named as "key_store." + the type of the default KeyStore installed in the system in lower case.
    For example: if default KeyStore type in the system is BKS (i.e. java.security file sets up the property keystore.type=BKS), thus classpath should point to the directory with "key_store.bks" file.
    This certstore file should contain self-signed certificate generated by keytool utility in a usual way.
    The password to the certstore should be "password" (without quotes).
    • Constructor Detail

      • HttpsURLConnectionTest

        public HttpsURLConnectionTest()
    • Method Detail

      • testGetDefaultSSLSocketFactory

        public void testGetDefaultSSLSocketFactory()
                                            throws Exception
        Checks that HttpsURLConnection's default SSLSocketFactory is operable.
        Throws:
        Exception
      • testHttpsConnection

        public void testHttpsConnection()
                                 throws Throwable
        Throws:
        Throwable
      • testHttpsConnection_Not_Found_Response

        public void testHttpsConnection_Not_Found_Response()
                                                    throws Throwable
        Tests the behaviour of HTTPS connection in case of unavailability of requested resource.
        Throws:
        Throwable
      • testSetDefaultSSLSocketFactory

        public void testSetDefaultSSLSocketFactory()
                                            throws Throwable
        Tests possibility to set up the default SSLSocketFactory to be used by HttpsURLConnection.
        Throws:
        Throwable
      • testSetSSLSocketFactory

        public void testSetSSLSocketFactory()
                                     throws Throwable
        Tests possibility to set up the SSLSocketFactory to be used by HttpsURLConnection.
        Throws:
        Throwable
      • testUnconnectedStateParameters

        public void testUnconnectedStateParameters()
                                            throws Throwable
        Tests the behaviour of HttpsURLConnection in case of retrieving of the connection state parameters before connection has been made.
        Throws:
        Throwable
      • testSetHostnameVerifier

        public void testSetHostnameVerifier()
                                     throws Throwable
        Tests if setHostnameVerifier() method replaces default verifier.
        Throws:
        Throwable
      • test_doOutput

        public void test_doOutput()
                           throws Throwable
        Tests the behaviour in case of sending the data to the server.
        Throws:
        Throwable
      • testProxyConnection

        public void testProxyConnection()
                                 throws Throwable
        Tests HTTPS connection process made through the proxy server.
        Throws:
        Throwable
      • testProxyAuthConnection

        public void testProxyAuthConnection()
                                     throws Throwable
        Tests HTTPS connection process made through the proxy server. Proxy server needs authentication.
        Throws:
        Throwable
      • testConsequentProxyConnection

        public void testConsequentProxyConnection()
                                           throws Throwable
        Tests HTTPS connection process made through the proxy server. 2 HTTPS connections are opened for one URL. For the first time the connection is opened through one proxy, for the second time through another.
        Throws:
        Throwable
      • testProxyAuthConnection_doOutput

        public void testProxyAuthConnection_doOutput()
                                              throws Throwable
        Tests HTTPS connection process made through the proxy server. Proxy server needs authentication. Client sends data to the server.
        Throws:
        Throwable
      • testProxyAuthConnectionFailed

        public void testProxyAuthConnectionFailed()
                                           throws Throwable
        Tests HTTPS connection process made through the proxy server. Proxy server needs authentication but client fails to authenticate (Authenticator was not set up in the system).
        Throws:
        Throwable
      • testProxyConnection_Not_Found_Response

        public void testProxyConnection_Not_Found_Response()
                                                    throws Throwable
        Tests the behaviour of HTTPS connection in case of unavailability of requested resource.
        Throws:
        Throwable
      • setUp

        public void setUp()
                   throws Exception
        Log the name of the test case to be executed.
        Throws:
        Exception
      • tearDown

        public void tearDown()
      • checkConnectionStateParameters

        public static void checkConnectionStateParameters(HttpsURLConnection clientConnection,
                                          SSLSocket serverPeer)
                                                   throws Exception
        Checks the HttpsURLConnection getter's values and compares them with actual corresponding values of remote peer.
        Throws:
        Exception
      • doInteraction

        public static Socket doInteraction(HttpsURLConnection clientConnection,
                           ServerSocket serverSocket,
                           int responseCode)
                                    throws Throwable
        Performs interaction between client's HttpsURLConnection and servers side (ServerSocket). Server will response with specified response code.
        Throws:
        Throwable
      • doInteraction

        public static Socket doInteraction(HttpsURLConnection clientConnection,
                           ServerSocket serverSocket,
                           int responseCode,
                           boolean doAuthentication)
                                    throws Throwable
        Performs interaction between client's HttpsURLConnection and servers side (ServerSocket). Server will response with specified response code.
        Parameters:
        doAuthentication - specifies if the server needs client authentication.
        Throws:
        Throwable


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 169 / 158863202. Delta: 0.05642 с