C
C#•3y ago
GNUGradyn

DotCover shows class with no methods is 0% covered

DotCover shows this class is 0% covered. However it is just a model it does not have any code of its own. How am I supposed to cover this
6 Replies
Anton
Anton•3y ago
why would you want to cover it if it's just data?
undisputed world champions
i'm with anton here while coverage is a good metric to keep an eye on, especially when you look at what paths in your code have been covered (and which not) but chasing 100% coverage is nothing you should spend to much time/effort on 😉 it's much more important to write meaningful and repeatable tests 😄
Pobiega
Pobiega•3y ago
It has methods - property getters and setters are methods.
Mayor McCheese
Mayor McCheese•3y ago
You can always decorate with ExcludeFromCodeCoverage; I hate this generally though.
GNUGradyn
GNUGradynOP•3y ago
how do you reccomend I handle this then i would be fine with just excluding it from code coverage
Mayor McCheese
Mayor McCheese•3y ago
An integration test or two will usually cover incidentals.

Did you find this page helpful?