I have a C# Entity Framework project with Data, Data Access and Service components. The Config admin has enabled code coverage(Sonarqube) that currently shows 0% coverage for Data and data access components.
1) Although the MSTest unit test code written for Service component's class method is doing something like --> Student s = new Student() (Student is a public class in Data component) I presume it won't be accounted for as a covered line for Data component? I verified that even writing a dummy test to check if invoking the constructor in a new testmethod it still marking the logicless data class Student as not covered. Is this expected ?
2) The Entity framework data component has virtually no business logic as it only has fluent api configuration classes, repositories and unit of work classes that don't do any logic on their own and rely on base implementation. And it seems obvious to me that one can't unit test the Data Access component as well.
With the above said points, would I be correct to ask the config team to exclude Data and Access components from participating in code coverage metrics ?