How do I allow assembly (unit testing one) to access internal properties of another assembly?

后端 未结 5 1682
说谎
说谎 2020-12-04 09:51

I would like my Core assembly to not expose a certain class and I would still like to be able to test it. How can I do that ?

5条回答
  •  离开以前
    2020-12-04 10:30

    I would suggest not going to such troubles ... if you really want to unit test your "internal" classes, just hide them away in a namespace that only your internal code would end up using. Unless you're writing a framework on the scale of the .NET framework, you don't really need that level of hiding.

提交回复
热议问题