You need to sign in to do that
Don't have an account?
Help needed to write Test Class for event and eventattendee object
Hi I have written the below code to fufill some requirement. Can you hele me to write Test class for this code. Please keep in mind that we can not create eventattendee records using API
public with sharing class ctlr_participants {
private string eventid {get; set;}
public ctlr_participants (ApexPages.StandardController eventcontroller) {
this.eventid = eventcontroller.getId();
}
public List<EventAttendee> getparticipants(){
system.debug('eventID'+ this.eventid);
string str = this.eventid;
List<EventAttendee> participants = new List<EventAttendee>();
system.debug(str);
participants = [select AttendeeId from EventAttendee where eventid =: str ];
system.debug('count of attendee'+ eventparticipants.SIZE());
return participants ;
}
}