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
why would you want to cover it if it's just data?
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 😄
It has methods - property getters and setters are methods.
You can always decorate with ExcludeFromCodeCoverage; I hate this generally though.
how do you reccomend I handle this then
i would be fine with just excluding it from code coverage
An integration test or two will usually cover incidentals.