Hi All, I'm trying to write integration test for PPal connector. PPal API is accepting REST calls with JSON body and return JSON objects as the response. Currently I have proxy [0] which accept JSON payload. I'm using SoapUI to send REST request with JSON body [1] to ESB.
The code snippet [2] is in my test method which is written following a sample integration test [3]. There, axisServiceClient.sendReceive() method returns an OMElement. But since PPal response is in JSON format, I'm getting parse error [4]. I'm thinking of, convert the response message type to XML from the proxy (only for the testing purposes) and assert tag names. Do you think is this a good approach ? Or else, is there any specific way to write integration tests with JSON support ? Appreciate your thoughts on this. [0] : https://gist.github.com/Chanaka/8911696 [1] : https://gist.github.com/Chanaka/8911788 [2] : https://gist.github.com/Chanaka/8911816 [3] : https://github.com/wso2/esb-connectors/blob/master/salesforce-connector-test/src/test/java/org/wso2/carbon/connector/integration/test/salesforce/SalesforceConnectorIntegrationTest.java [4] : https://gist.github.com/Chanaka/8911862 Regards ! -- Chanaka Dharmarathna *http://chanakaindrajith.blogspot.com/*<http://chanakaindrajith.blogspot.com/>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
