function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jitender  PaddaJitender Padda 

Class AnimalsCalloutsTest fails to compile in Apex Rest Callouts

Hi Trailhead Support,

I would like to point out an error which I recieved during compiling the  AnimalsCalloutsTest Class in the Apex Rest Callouts. The error was due to the following line and it was because the class Test is now part of the System class and it should have been System.Test.setMock(HttpCalloutMock.class, mock); instead of Test.setMock(HttpCalloutMock.class, mock);

User-added image

The API version of my class is 35.0 so I believe it requires the above correction. Please fix this if it is an error or you can correct me if I am wrong.

Thanks,
Jitender
Carlos Campillo GallegoCarlos Campillo Gallego
Hi Jitender,

If you want to contact Trailhead Support team, drop them an email to trailhead@salesforce.com

Regards
Uvais KomathUvais Komath
Test.setMock(HttpCalloutMock.class, mock);
^ Passed the challenge with this