use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class HTTPHeaderCaseSensitivityTestCase method testHttpHeaderLowerCase.
/**
* Test by adding a http header with all lowercase letters
* @throws AxisFault
*/
public void testHttpHeaderLowerCase() throws AxisFault {
StockQuoteSampleClient client = getStockQuoteClient();
client.addHttpHeader("test_header", "lowercase");
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/httpHeaderTestProxy", null, null, "WSO2", null);
assertNotNull("Response message null", response);
OMElement returnElement = response.getFirstElement();
OMElement symbolElement = returnElement.getFirstChildWithName(new QName("http://services.samples/xsd", "symbol"));
assertEquals("Fault, invalid response", "lowercase", symbolElement.getText());
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class PropertyIntegrationAxis2ScopeTestCase method testDoubleVal.
public void testDoubleVal() throws Exception {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyDoubleAxis2TestProxy", null, null, "Random Symbol", null);
assertTrue("Double Property Not Set in the Axis2 scope!", response.toString().contains("123123.123123"));
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class PropertyIntegrationAxis2ScopeTestCase method testBooleanVal.
public void testBooleanVal() throws Exception {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyBooleanAxis2TestProxy", null, null, "Random Symbol", null);
assertTrue("Boolean Property Not Set in the Axis2 scope!", response.toString().contains("true"));
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class PropertyIntegrationAxis2ScopeTestCase method testOMVal.
public void testOMVal() throws Exception {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyOMAxis2TestProxy", null, null, "Random Symbol", null);
assertTrue("OM Property Not Set in the Axis2 scope!", response.toString().contains("OMMMMM"));
}
use of org.apache.synapse.samples.framework.clients.StockQuoteSampleClient in project wso2-synapse by wso2.
the class PropertyIntegrationAxis2ScopeTestCase method testStringVal.
public void testStringVal() throws Exception {
StockQuoteSampleClient client = getStockQuoteClient();
OMElement response = client.sendStandardQuoteRequest("http://localhost:8280/services/propertyStringAxis2TestProxy", null, null, "Random Symbol", null);
assertTrue("String Property Not Set in the Axis2 scope!", response.toString().contains("WSO2 Lanka"));
}
Aggregations