FileDocCategorySizeDatePackage
SSLSessionBindingListenerTest.javaAPI DocAndroid 1.5 API3718Wed May 06 22:41:06 BST 2009tests.api.javax.net.ssl

SSLSessionBindingListenerTest

public class SSLSessionBindingListenerTest extends TestCase
Tests for SSLSessionBindingListener class

Fields Summary
Constructors Summary
Methods Summary
public voidtest_valueBound()

throws
IOException
throws
UnknownHostException
throws
InterruptedException
tests
javax.net.ssl.SSLSessionBindingListener#valueBound(SSLSessionBindingEvent event)

        SSLSocket sock = (SSLSocket) SSLSocketFactory.getDefault()
                .createSocket();
        SSLSession ss = sock.getSession();
        mySSLSessionBindingListener sbl = new mySSLSessionBindingListener();
        ss.putValue("test", sbl);
        assertTrue("valueBound was not called.", sbl.boundDone);
    
public voidtest_valueUnbound()

throws
IOException
throws
UnknownHostException
tests
javax.net.ssl.SSLSessionBindingListener#valueUnbound(SSLSessionBindingEvent event)

        SSLSocket sock = (SSLSocket) SSLSocketFactory.getDefault()
                .createSocket();
        SSLSession ss = sock.getSession();
        mySSLSessionBindingListener sbl = new mySSLSessionBindingListener();
        ss.putValue("test", sbl);
        ss.removeValue("test");
        assertTrue("valueUnbound was not called.", sbl.unboundDone);