Moq how do you test internal methods?

前端 未结 6 1822
借酒劲吻你
借酒劲吻你 2021-01-05 02:02

Told by my boss to use Moq and that is it. I like it but it seems that unlike MSTest or mbunit etc... you cannot test internal methods

So I am forced to make public

6条回答
  •  余生分开走
    2021-01-05 03:00

    InternalsVisibleTo is your friend for testing internals. Remember to sign your assemblies and you're safe.

提交回复
热议问题