Search in sources :

Example 1 with SwATestCase

use of org.apache.axis2.transport.testkit.tests.async.SwATestCase 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));
                        }
                    }
                }
            }
        }
    }
}
Also used : AsyncEndpoint(org.apache.axis2.transport.testkit.endpoint.AsyncEndpoint) XMLMessage(org.apache.axis2.transport.testkit.message.XMLMessage) InOutEndpoint(org.apache.axis2.transport.testkit.endpoint.InOutEndpoint) AsyncChannel(org.apache.axis2.transport.testkit.channel.AsyncChannel) RequestResponseTestClient(org.apache.axis2.transport.testkit.client.RequestResponseTestClient) BinaryTestCase(org.apache.axis2.transport.testkit.tests.async.BinaryTestCase) RESTTestCase(org.apache.axis2.transport.testkit.tests.async.RESTTestCase) TextPlainTestCase(org.apache.axis2.transport.testkit.tests.async.TextPlainTestCase) LargeSOAPAsyncMessageTestCase(org.apache.axis2.transport.testkit.tests.async.LargeSOAPAsyncMessageTestCase) SwATestCase(org.apache.axis2.transport.testkit.tests.async.SwATestCase) XMLRequestResponseMessageTestCase(org.apache.axis2.transport.testkit.tests.echo.XMLRequestResponseMessageTestCase) AsyncTestClient(org.apache.axis2.transport.testkit.client.AsyncTestClient) RequestResponseChannel(org.apache.axis2.transport.testkit.channel.RequestResponseChannel) XMLAsyncMessageTestCase(org.apache.axis2.transport.testkit.tests.async.XMLAsyncMessageTestCase)

Aggregations

AsyncChannel (org.apache.axis2.transport.testkit.channel.AsyncChannel)1 RequestResponseChannel (org.apache.axis2.transport.testkit.channel.RequestResponseChannel)1 AsyncTestClient (org.apache.axis2.transport.testkit.client.AsyncTestClient)1 RequestResponseTestClient (org.apache.axis2.transport.testkit.client.RequestResponseTestClient)1 AsyncEndpoint (org.apache.axis2.transport.testkit.endpoint.AsyncEndpoint)1 InOutEndpoint (org.apache.axis2.transport.testkit.endpoint.InOutEndpoint)1 XMLMessage (org.apache.axis2.transport.testkit.message.XMLMessage)1 BinaryTestCase (org.apache.axis2.transport.testkit.tests.async.BinaryTestCase)1 LargeSOAPAsyncMessageTestCase (org.apache.axis2.transport.testkit.tests.async.LargeSOAPAsyncMessageTestCase)1 RESTTestCase (org.apache.axis2.transport.testkit.tests.async.RESTTestCase)1 SwATestCase (org.apache.axis2.transport.testkit.tests.async.SwATestCase)1 TextPlainTestCase (org.apache.axis2.transport.testkit.tests.async.TextPlainTestCase)1 XMLAsyncMessageTestCase (org.apache.axis2.transport.testkit.tests.async.XMLAsyncMessageTestCase)1 XMLRequestResponseMessageTestCase (org.apache.axis2.transport.testkit.tests.echo.XMLRequestResponseMessageTestCase)1