1 45 package org.exolab.jms.net.http.connector; 46 47 import junit.framework.Test; 48 import junit.framework.TestSuite; 49 50 import org.exolab.jms.net.connector.ConnectionRequestInfo; 51 import org.exolab.jms.net.connector.ManagedConnectionFactory; 52 import org.exolab.jms.net.connector.ManagedConnectionFactoryTestCase; 53 import org.exolab.jms.net.http.HTTPRequestInfo; 54 import org.exolab.jms.net.http.HTTPSManagedConnectionFactory; 55 import org.exolab.jms.net.socket.SocketRequestInfo; 56 import org.exolab.jms.net.uri.URI; 57 import org.exolab.jms.net.util.SSLProperties; 58 import org.exolab.jms.net.util.SSLUtil; 59 60 61 67 public class HTTPSManagedConnectionFactoryTest 68 extends ManagedConnectionFactoryTestCase { 69 70 75 public HTTPSManagedConnectionFactoryTest(String name) { 76 super(name); 77 } 78 79 84 public static Test suite() { 85 return new TestSuite(HTTPSManagedConnectionFactoryTest.class); 86 } 87 88 93 public static void main(String [] args) { 94 junit.textui.TestRunner.run(suite()); 95 } 96 97 103 protected ManagedConnectionFactory createManagedConnectionFactory() 104 throws Exception { 105 return new HTTPSManagedConnectionFactory(); 106 } 107 108 115 protected ConnectionRequestInfo getManagedConnectionRequestInfo() 116 throws Exception { 117 HTTPRequestInfo info = new HTTPRequestInfo( 118 new URI("https://localhost:8443/openjms-tunnel/tunnel")); 119 SSLProperties properties = 120 SSLUtil.getSSLProperties("test.keystore", "secret"); 121 info.setSSLProperties(properties); 122 return info; 123 } 124 125 133 protected ConnectionRequestInfo getAcceptorConnectionRequestInfo() 134 throws Exception { 135 return new SocketRequestInfo(new URI("https-server://localhost:3030")); 136 } 137 138 } 139 | Popular Tags |