Looking for .NET mocking framework that allows testing methods having non-injected dependencies

后端 未结 2 444
情书的邮戳
情书的邮戳 2021-01-27 23:57

I\'m wondering if there\'s any mocking framework that allows testing methods contaning method calls to dependent class instances not injected to the tested method or its class:<

2条回答
  •  無奈伤痛
    2021-01-28 00:02

    I have never used it but based on some articles Moles should be able to do that.

    MSDN says:

    Mole types use a powerful detouring framework that uses code profiler APIs to intercept calls to dependency classes and redirects the calls to a fake object

提交回复
热议问题