• Mila Mirovic
  • NEWBIE
  • -1 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I'm stuck.  Worked through most of my issues but now every time I run the test on this test class I get a "Methods defined as TestMethod do not support Web service callouts" error.  Can someone help identify what I have incorrect in my test class?  Is there something I have to do to force it to use the Mock instead that I just don't see?

Here's that I have in the test class:
@isTest
public class WarehouseSyncTest {

     @isTest static void testScheduledJob() {
        String CRON_EXP = '0 0 0 15 3 ? 2022';
        Test.startTest();
        String jobid = System.schedule('EquipTest', CRON_EXP, new WarehouseSyncSchedule());
        Test.stopTest();
        CronTrigger ct = [SELECT State FROM CronTrigger WHERE ID = :jobId];
        System.assertEquals('WAITING', String.valueOf(ct.State));
    }
}

Have also tried it with private instead of public on the class - and I get the same error.
Performing the first Challenge of this Superbadge for APEX, I am receiving the below error. But it is not true because the Maintenance Request does indeed have all of the attributes cited when I try via the GUI and via a Test Class. Can someone please tell me what is wrong?

Challenge Not yet complete... here's what's wrong:
Inserting a new Maintenance Request of type 'Routine Maintenance' and then closing it did not create of a new Maintenance Request based upon the original record correctly. The challenge is expecting to find the closed Maintenance Request plus an 'New' Maintenance Request of type 'Routine Maintenance' with the same Vehicle as the closed one.

(Also, the challenge didn't specifically mention that the Case and Product2 objects should be relabeled)