You need to sign in to do that
Don't have an account?
SFMiester
Error: Invalid interface: HttpCalloutMock
Hi Experts!
Im trying to complete one of the trailhead tasks, but it keeps erroring out with the following error message. AnimalsHttpCalloutMock: Invalid interface: HttpCalloutMock. Am I doing something wrong?
Im trying to complete one of the trailhead tasks, but it keeps erroring out with the following error message. AnimalsHttpCalloutMock: Invalid interface: HttpCalloutMock. Am I doing something wrong?
@isTest global class AnimalsHttpCalloutMock implements HttpCalloutMock { // Implement this interface method global HTTPResponse respond(HTTPRequest request) { // Create a fake response HttpResponse response = new HttpResponse(); response.setHeader('Content-Type', 'application/json'); response.setBody('{"animals": ["majestic badger", "fluffy bunny", "scary bear", "chicken", "mighty moose"]}'); response.setStatusCode(200); return response; } }Appreciate the help!
All Answers