Hi,
I have a DTO class which consists purely of auto-implemented properties like this:
public class Person
{
[Key]
public string Id { get; set; }
public string Surname { get; set; }
public string Forename { get; set; }
public DateTime? DateOfBirth { get; set; }
}
When I run my unit tests I don't get any coverage information on this class. I haven't written any unit tests for the class yet and expected to see low code coverage, but this class just isn't included in the coverage.
If I add a new method to the class I do get results saying the new method isn't covered.
Are auto-implemented properties omitted intentionally as they are part of the framework so strictly speaking you shouldn't need to write tests for them?
Thanks,
Paul