use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class PropertyIntegrationAxis2ClientScopeTestCase method testShortVal.
public void testShortVal() throws Exception {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyShortAxis2ClientTestProxy", null, null, "Random Symbol", null);
assertTrue("Short Property Not Set in the Axis2-client scope!", response.toString().contains("12"));
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class InlineFunctionTestCase method testInlineFunction.
public void testInlineFunction() throws Exception {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendCustomQuoteRequest("http://localhost:8280/services/scriptMediatorJSInlineTestProxy", null, null, "wso2");
assertNotNull("Response message null", response);
assertEquals("Local Name does not match", "Code", response.getFirstElement().getLocalName().toString());
assertEquals("Local Part does not match", "CheckPriceResponse", response.getQName().getLocalPart().toString());
assertEquals("Text does not match", "wso2", response.getFirstChildWithName(new QName("http://services.samples/xsd", "Code")).getText());
assertEquals("Local Name does not match", "Price", response.getFirstChildWithName(new QName("http://services.samples/xsd", "Price")).getLocalName());
assertNotNull("Text does not exist", response.getFirstChildWithName(new QName("http://services.samples/xsd", "Price")).getText());
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class PropertyIntegrationAxis2ScopeTestCase method testLongVal.
public void testLongVal() throws Exception {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyLongAxis2TestProxy", null, null, "Random Symbol", null);
assertTrue("Long Property Not Set in the Axis2 scope!", response.toString().contains("123123123"));
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class PropertyIntegrationAxis2ScopeTestCase method testIntVal.
public void testIntVal() throws Exception {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyIntAxis2TestProxy", null, null, "Random Symbol", null);
assertTrue("Integer Property Not Set in the Axis2 scope!", response.toString().contains("123"));
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class PropertyIntegrationAxis2ScopeTestCase method testFloatVal.
public void testFloatVal() throws Exception {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyFloatAxis2TestProxy", null, null, "Random Symbol", null);
assertTrue("Float Property Not Set in the Axis2 scope!", response.toString().contains("123.123"));
}
Aggregations