8. Test Scheduling Logic | Apex Specialist Superbadge | ApexSalesforceTutorials.com

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.พ. 2024
  • #salesforce #trailhead #codding #superbadge
    Please find the code in the comment.
    8th Part Of Apex Specialist Superbadge
    Solution of Test Scheduling Logic of Apex Specialist Superbadge.
    You can ask for solution of any trailhead in the comment section.
    Please do Like, Subscribe, Comment, & Share with your fellow mates.
    The content is for educational purposes and guidance for programmers.

ความคิดเห็น • 9

  • @apexsalesforcetutorials
    @apexsalesforcetutorials  5 หลายเดือนก่อน +3

    ************************* WarehouseSyncSchedule *****************
    global class WarehouseSyncSchedule implements Schedulable {
    global void execute(SchedulableContext ctx) {

    WarehouseCalloutService.runWarehouseEquipmentSync();
    }
    }
    *************************** WarehouseSyncScheduleTest ******************
    @isTest
    public class WarehouseSyncScheduleTest {

    @isTest static void WarehousescheduleTest(){
    String scheduleTime = '00 00 01 * * ?';
    Test.startTest();
    Test.setMock(HttpCalloutMock.class, new WarehouseCalloutServiceMock());
    String jobID=System.schedule('Warehouse Time To Schedule to Test', scheduleTime, new WarehouseSyncSchedule());
    Test.stopTest();
    //Contains schedule information for a scheduled job. CronTrigger is similar to a cron job on UNIX systems.
    // This object is available in API version 17.0 and later.
    CronTrigger a=[SELECT Id FROM CronTrigger where NextFireTime > today];
    System.assertEquals(jobID, a.Id,'Schedule ');


    }
    }

  • @MiniTV_Masala
    @MiniTV_Masala 5 หลายเดือนก่อน +4

    Great

  • @hrideshtaldar
    @hrideshtaldar 5 หลายเดือนก่อน +4

    Nice videos

  • @HelloWorld-nv4lg
    @HelloWorld-nv4lg 5 หลายเดือนก่อน +3

    Nice, thanks

  • @HelloWorld-nv4lg
    @HelloWorld-nv4lg 5 หลายเดือนก่อน +3

    Thanks for uploading