use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class Sample253 method testPlaceOrder.
public void testPlaceOrder() throws Exception {
Axis2BackEndServerController axis2Server = getAxis2Server();
if (axis2Server == null) {
fail("Failed to load the Axis2BackEndServerController");
}
assertEquals("Invalid message count at the backend", 0, axis2Server.getMessageCount("SimpleStockQuoteService", "placeOrder"));
String trpUrl = "http://localhost:8280/services/OneWayProxy";
StockQuoteSampleClient client = getStockQuoteClient();
client.placeOrder(null, trpUrl, null, "IBM");
boolean expectedMessageCountReceived = SynapseTestUtils.waitForMessageCount(axis2Server, "SimpleStockQuoteService", "placeOrder", 1, 2000);
assertTrue("Backend service not received the expected message count", expectedMessageCountReceived);
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class Sample3 method testLocalEntriesReusableEndPointsSequences.
public void testLocalEntriesReusableEndPointsSequences() {
String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
String trpUrl = "http://localhost:8280";
StockQuoteSampleClient client = getStockQuoteClient();
log.info("Running test: Local Registry entry definitions, reusable endpoints and sequences");
SampleClientResult result = client.requestStandardQuote(addUrl, trpUrl, null, "IBM", null);
assertResponseReceived(result);
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class Sample6 method testManipulatingHeadersAndFiltering.
public void testManipulatingHeadersAndFiltering() {
String trpUrl = "http://localhost:8280/";
StockQuoteSampleClient client = getStockQuoteClient();
log.info("Running test: Dumb Client mode ");
SampleClientResult result = client.requestStandardQuote(null, trpUrl, null, null, null);
assertResponseReceived(result);
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class Sample8 method testRegistryAndXSLTMediator.
public void testRegistryAndXSLTMediator() {
String addUrl = "http://localhost:9000/services/SimpleStockQuoteService";
String trpUrl = "http://localhost:8280/";
StockQuoteSampleClient client = getStockQuoteClient();
log.info("Running test: Introduction to static and dynamic registry resources, and using XSLT transformations");
SampleClientResult result = client.requestCustomQuote(addUrl, trpUrl, null, "IBM");
assertResponseReceived(result);
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class Sample751 method testSplitAggregate.
public void testSplitAggregate() throws Exception {
String addUrl = "http://localhost:8280/services/SplitAggregateProxy";
StockQuoteSampleClient client = getStockQuoteClient();
log.info("Running test: Message Split Aggregate Using Templates");
SampleClientResult result = client.requestStandardQuote(addUrl, null, null, "IBM", null);
assertTrue("Invalid result received", result.responseReceived());
}
Aggregations