During writing the test class the problem is testing a method that makes a REST request, 
I have tried to implment "HttpCalloutMock" without success an am getting the following error =
"System.XmlException: only whitespace content allowed before start tag and not [ (position: START_DOCUMENT seen [... @1:1)"
Solution :  
It's
 like the document .getChildElement and Root element on this fake response is not valid, It might be format problem like XML or JSon .
Please pass the fake response as you require i mean you are getting fake response in your debug log is not valid response its could be format problem .
Thanks
Gaurav
 
 
No comments:
Post a Comment