I am a Java programming now also writing in C#. I have seen Accessor classes generated by the VS test generating software (to give access from Tests to private members or functions). Should I be creating Accessors deliberately and if so why
Share
The generated accessors in MSTest are there to test the private parts of classes. So already there I would ask myself should we explicitly test internals.
I believe unit tests should only exercise the public face of a class, thus the generated accessor stuff becomes obsolete. In my experience that is a good thing, since I find them non-trivial to maintain especially when things change (as they usually do with refactoring going on).