C
C#2y 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
Anton2y 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
Pobiega2y ago
It has methods - property getters and setters are methods.
Mayor McCheese
You can always decorate with ExcludeFromCodeCoverage; I hate this generally though.
GNUGradyn
GNUGradyn2y ago
how do you reccomend I handle this then i would be fine with just excluding it from code coverage
Mayor McCheese
An integration test or two will usually cover incidentals.