Timeline for How to write a test class for a method that send a htttp request among other things [duplicate]
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 4, 2019 at 13:35 | comment | added | David Reed |
Your method does not need to return an HTTP response to use a Mock. The Mock is responsible for providing the return value that comes back to your code from http.send() .
|
|
Jun 4, 2019 at 9:13 | comment | added | Pranay Jaiswal | Can you try this and write a test class and see if it works. trailhead.salesforce.com/en/content/learn/modules/… | |
Jun 4, 2019 at 6:45 | review | Reopen votes | |||
Jun 4, 2019 at 13:37 | |||||
Jun 4, 2019 at 6:26 | comment | added | Javier | My method doesn't return a http response so I don't know how to make the mock properly. | |
Jun 4, 2019 at 6:25 | history | edited | Javier | CC BY-SA 4.0 |
added 139 characters in body
|
Jun 3, 2019 at 13:10 | history | closed |
Derek F Adrian Larson♦ apex Users with the apex badge or a synonym can single-handedly close apex questions as duplicates and reopen them as needed. |
Duplicate of How do I unit test code that includes a callout? | |
Jun 3, 2019 at 13:01 | history | asked | Javier | CC BY-SA 4.0 |