What is the DynamicProxyGenAssembly2 assembly?

前端 未结 1 535
忘掉有多难
忘掉有多难 2021-02-18 20:55

I use Moq for my unit tests. To test internal interfaces I have to declare the InternalsVisibleTo attribute to the DynamicProxyGenAssembly2 assembly.

We run our tests ob

1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-18 21:10

    DynamicProxyGenAssembly2 is a temporary assembly built by mocking systems that use CastleProxy like Moq or NSubsitute. It is generated when the mock is needed and disposed of after the tests are finished.

    As for the Expose Internals method than there is a RhinoMocks solution that would work for your Moq one with minimal changes:

    http://ayende.com/Wiki/Rhino+Mocks+-+Internal+Methods.ashx?AspxAutoDetectCookieSupport=1

    0 讨论(0)
提交回复
热议问题