You need to sign in to do that
Don't have an account?
hemantgarg
WebService Callout mock does not seem to work
Hi, I followed below post to mock a webservice callout for test class :- http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm but it does not seem to work, is there any other setting required to make it work ? API Version is 26.0 and I am doing it on developer edition. It is still throwing error saying "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out " Can anyone please help me ? Thanks in advance .
This is an unknown issue. You can not use DML in the WebServiceMock or HttpCalloutMock. Check the links below,
http://success.salesforce.com/ideaView?id=08730000000jcfAAAQ
http://blogs.developerforce.com/developer-relations/2012/10/testing-http-callouts-with-static-data-in-winter-13.html