You need to sign in to do that
Don't have an account?
vicky kr 3
Need Help In Writing Test Class,,Apex Code Is Working Perfectly
public class eventCreation {
//eventCreation.demoEvent();
public static void demoEvent(){
Event newEvent = new Event();
newEvent.OwnerId = '0055i000003MTGlAAO';
newEvent.Subject ='Testing Demo event';
//newEvent.WhatId = recordId;
newEvent.ActivityDate = System.today();
newEvent.IsRecurrence = true;
newEvent.RecurrenceStartDateTime = System.today();
newEvent.RecurrenceEndDateOnly = System.today()+30;
newEvent.RecurrenceType = 'RecursDaily';
newEvent.RecurrenceInterval = 1;
newEvent.IsAllDayEvent =true;
newEvent.DurationInMinutes =1440;
insert newEvent;
}
}
//eventCreation.demoEvent();
public static void demoEvent(){
Event newEvent = new Event();
newEvent.OwnerId = '0055i000003MTGlAAO';
newEvent.Subject ='Testing Demo event';
//newEvent.WhatId = recordId;
newEvent.ActivityDate = System.today();
newEvent.IsRecurrence = true;
newEvent.RecurrenceStartDateTime = System.today();
newEvent.RecurrenceEndDateOnly = System.today()+30;
newEvent.RecurrenceType = 'RecursDaily';
newEvent.RecurrenceInterval = 1;
newEvent.IsAllDayEvent =true;
newEvent.DurationInMinutes =1440;
insert newEvent;
}
}
Try below Code 100% Coverage Please Mark It As Best Asnwer If It Helps
Thank You!
All Answers
Try below Code 100% Coverage Please Mark It As Best Asnwer If It Helps
Thank You!
try with below code.
Thanks!!