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;
}
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());
}
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();
}
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();
}
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();
}
Aggregations