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
Bablu Kumar PanditBablu Kumar Pandit 

how to insert day of week in test class

AbhishekAbhishek (Salesforce Developers) 
You can do something like this:

e.StartDateTime = datetime.newInstance(2014, 9, 15, 12, 30, 0); e.EndDateTime = datetime.newInstance(2014, 9, 15, 13, 30, 0);

Here is the signature for the newInstance method:

public static Datetime newInstance(Integer year, Integer month, Integer day, Integer hour, Integer minute, Integer second)

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.