use of org.apache.axis2.transport.testkit.tests.async.RESTTestCase in project wso2-axis2-transports by wso2.
the class TransportTestSuiteBuilder method build.
private void build(Object[] env) {
for (ResourceRelation<AsyncChannel> channel : asyncChannels) {
for (ResourceRelation<AsyncTestClient<XMLMessage>> client : xmlAsyncClients) {
for (ResourceRelation<AsyncEndpoint<XMLMessage>> endpoint : xmlAsyncEndpoints) {
Object[] resources = merge(env, channel, client, endpoint);
for (MessageTestData data : messageTestData) {
for (XMLMessage.Type type : XMLMessage.Type.values()) {
if (type != XMLMessage.Type.SWA) {
suite.addTest(new XMLAsyncMessageTestCase(channel.getPrimaryResource(), client.getPrimaryResource(), endpoint.getPrimaryResource(), type, data, resources));
}
}
}
suite.addTest(new SwATestCase(channel.getPrimaryResource(), client.getPrimaryResource(), endpoint.getPrimaryResource(), resources));
// Regression test for SYNAPSE-423:
suite.addTest(new LargeSOAPAsyncMessageTestCase(channel.getPrimaryResource(), client.getPrimaryResource(), endpoint.getPrimaryResource(), resources));
}
}
for (ResourceRelation<AsyncTestClient<String>> client : stringAsyncClients) {
for (ResourceRelation<AsyncEndpoint<String>> endpoint : stringAsyncEndpoints) {
Object[] resources = merge(env, channel, client, endpoint);
for (MessageTestData data : messageTestData) {
suite.addTest(new TextPlainTestCase(channel.getPrimaryResource(), client.getPrimaryResource(), endpoint.getPrimaryResource(), data, resources));
}
}
}
for (ResourceRelation<AsyncTestClient<byte[]>> client : byteAsyncClients) {
for (ResourceRelation<AsyncEndpoint<byte[]>> endpoint : byteAsyncEndpoints) {
Object[] resources = merge(env, channel, client, endpoint);
suite.addTest(new BinaryTestCase(channel.getPrimaryResource(), client.getPrimaryResource(), endpoint.getPrimaryResource(), resources));
}
}
for (ResourceRelation<AsyncTestClient<RESTMessage>> client : restAsyncClients) {
for (ResourceRelation<AsyncEndpoint<RESTMessage>> endpoint : restAsyncEndpoints) {
Object[] resources = merge(env, channel, client, endpoint);
suite.addTest(new RESTTestCase(channel.getPrimaryResource(), client.getPrimaryResource(), endpoint.getPrimaryResource(), restTestMessage1, resources));
// TODO: regression test for SYNAPSE-431
// addTest(new RESTTestCase(env, channel, client, endpoint, restTestMessage2));
}
}
}
for (ResourceRelation<RequestResponseChannel> channel : requestResponseChannels) {
for (ResourceRelation<RequestResponseTestClient<XMLMessage, XMLMessage>> client : xmlRequestResponseClients) {
for (ResourceRelation<InOutEndpoint> endpoint : echoEndpoints) {
Object[] resources = merge(env, channel, client, endpoint);
for (MessageTestData data : messageTestData) {
for (XMLMessage.Type type : XMLMessage.Type.values()) {
if (type != XMLMessage.Type.SWA) {
suite.addTest(new XMLRequestResponseMessageTestCase(channel.getPrimaryResource(), client.getPrimaryResource(), endpoint.getPrimaryResource(), type, data, resources));
}
}
}
}
}
}
}
Aggregations