1 45 package org.exolab.jms.net.tcp.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.ManagedConnectionTestCase; 53 import org.exolab.jms.net.tcp.TCPSManagedConnectionFactory; 54 import org.exolab.jms.net.tcp.TCPSRequestInfo; 55 import org.exolab.jms.net.uri.URI; 56 import org.exolab.jms.net.util.SSLProperties; 57 import org.exolab.jms.net.util.SSLUtil; 58 59 60 66 public class TCPSManagedConnectionTest extends ManagedConnectionTestCase { 67 68 73 public TCPSManagedConnectionTest(String name) { 74 super(name); 75 } 76 77 82 public static Test suite() { 83 return new TestSuite(TCPSManagedConnectionTest.class); 84 } 85 86 91 public static void main(String [] args) { 92 junit.textui.TestRunner.run(suite()); 93 } 94 95 101 protected ManagedConnectionFactory createManagedConnectionFactory() 102 throws Exception { 103 return new TCPSManagedConnectionFactory(); 104 } 105 106 113 protected ConnectionRequestInfo getManagedConnectionRequestInfo() 114 throws Exception { 115 TCPSRequestInfo info = 116 new TCPSRequestInfo(new URI("tcps://localhost:5099")); 117 SSLProperties properties = 118 SSLUtil.getSSLProperties("test.keystore", "secret"); 119 info.setSSLProperties(properties); 120 return info; 121 } 122 123 131 protected ConnectionRequestInfo getAcceptorConnectionRequestInfo() 132 throws Exception { 133 return getManagedConnectionRequestInfo(); 134 } 135 136 } 137 | Popular Tags |