c#: public when debugging, private otherwise -
is there nice way make functions public when testing nunit, private otherwise?
not having generate lot of extraneous code nice.
------------------------edit------------------------
it seems solutions fall under 3 types:
- don't i'm attempting do.
- use compiler directives.
- try clever solution (like using internalsvisibleto).
might there way programmatically? i.e. create new temporary app makes protected/private/internal
functions public
, plug nunit, run tests there, , go using private functions release version?
you might not need if have coverage on public methods call private methods seems debate self.
this link tdd , different ways it: how test private , protected methods in .net
Comments
Post a Comment