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:

  1. don't i'm attempting do.
  2. use compiler directives.
  3. try clever solution (like using internalsvisibleto).

might there way programmatically? i.e. create new temporary app makes protected/private/internalfunctions 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

Popular posts from this blog

Javascript line number mapping -

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -