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
Allen2Allen2 

I have written the following apex class and want to write a test class for that. Can anyone please help me out to write the test class for this.

public class Task{
    public Datetime Created_Date;
    public Date Completed_Date;
    public String Comments;
    public string Email;
    public string Amount;
}
 
Artem ChernovArtem Chernov

Hi
I suppose you have not rows to be covered in that class. If you open that class in SF UI (Develop -> Apex Classes - > Task), you will see: "0% (No coverage data)"
If you add something like: 

public string mock = '';

you will see: "Code Coverage 0% (0/1)"
Allen2Allen2
It is not working at all. Help me out to write the test class for this