Search in sources :

Example 11 with Setup

use of org.apache.axis2.transport.testkit.tests.Setup in project wso2-axis2-transports by wso2.

the class MailClient method setUp.

@Setup
@SuppressWarnings("unused")
private void setUp(MailTestEnvironment env, MailChannel channel) throws Exception {
    Properties props = new Properties();
    props.putAll(env.getOutProperties());
    session = Session.getInstance(props);
    this.channel = channel;
}
Also used : Properties(java.util.Properties) Setup(org.apache.axis2.transport.testkit.tests.Setup)

Example 12 with Setup

use of org.apache.axis2.transport.testkit.tests.Setup in project wso2-axis2-transports by wso2.

the class MailRequestResponseClient method setUp.

@Setup
@SuppressWarnings("unused")
private void setUp(MailTestEnvironment env, MailChannel channel) throws MessagingException {
    this.channel = channel;
    Session session = channel.getReplySession();
    session.setDebug(log.isTraceEnabled());
    store = session.getStore(env.getProtocol());
    MailTestEnvironment.Account sender = channel.getSender();
    store.connect(sender.getLogin(), sender.getPassword());
}
Also used : Session(javax.mail.Session) Setup(org.apache.axis2.transport.testkit.tests.Setup)

Example 13 with Setup

use of org.apache.axis2.transport.testkit.tests.Setup in project wso2-axis2-transports by wso2.

the class HttpChannel method setUp.

@Setup
@SuppressWarnings("unused")
private void setUp(HttpTestEnvironment env) throws Exception {
    serviceName = "TestService-" + UUID.randomUUID();
    tunnel = new Tunnel(new InetSocketAddress("127.0.0.1", env.getServerPort()));
    tunnel.start();
}
Also used : Tunnel(org.apache.axis2.transport.testkit.util.tcpmon.Tunnel) InetSocketAddress(java.net.InetSocketAddress) Setup(org.apache.axis2.transport.testkit.tests.Setup)

Example 14 with Setup

use of org.apache.axis2.transport.testkit.tests.Setup in project wso2-axis2-transports by wso2.

the class JettyServer method setUp.

@Setup
@SuppressWarnings("unused")
private void setUp(HttpTestEnvironment env) throws Exception {
    server = new Server();
    SocketListener listener = new SocketListener();
    listener.setPort(env.getServerPort());
    server.addListener(listener);
    context = new HttpContext(server, Channel.CONTEXT_PATH + "/*");
    server.start();
}
Also used : SocketListener(org.mortbay.http.SocketListener) Server(org.mortbay.jetty.Server) HttpContext(org.mortbay.http.HttpContext) Setup(org.apache.axis2.transport.testkit.tests.Setup)

Example 15 with Setup

use of org.apache.axis2.transport.testkit.tests.Setup in project wso2-axis2-transports by wso2.

the class JMSClient method setUp.

@Setup
@SuppressWarnings("unused")
private void setUp(JMSTestEnvironment env, JMSChannel channel) throws Exception {
    Destination destination = channel.getDestination();
    ConnectionFactory connectionFactory = env.getConnectionFactory();
    connection = connectionFactory.createConnection();
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    producer = session.createProducer(destination);
    contentTypeMode = channel.getContentTypeMode();
}
Also used : Destination(javax.jms.Destination) ConnectionFactory(javax.jms.ConnectionFactory) Setup(org.apache.axis2.transport.testkit.tests.Setup)

Aggregations

Setup (org.apache.axis2.transport.testkit.tests.Setup)16 ConnectionFactory (javax.jms.ConnectionFactory)3 AxisConfiguration (org.apache.axis2.engine.AxisConfiguration)3 InetSocketAddress (java.net.InetSocketAddress)2 Destination (javax.jms.Destination)2 ConfigurationContext (org.apache.axis2.context.ConfigurationContext)2 AxisService (org.apache.axis2.description.AxisService)2 TransportOutDescription (org.apache.axis2.description.TransportOutDescription)2 Tunnel (org.apache.axis2.transport.testkit.util.tcpmon.Tunnel)2 GreenMail (com.icegreen.greenmail.util.GreenMail)1 ServerSetup (com.icegreen.greenmail.util.ServerSetup)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 PrintWriter (java.io.PrintWriter)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 List (java.util.List)1 Properties (java.util.Properties)1 BytesMessage (javax.jms.BytesMessage)1 Message (javax.jms.Message)1