2010-08-29 65 views

回答

13

您可以使用下面的框架它:

  1. Typemock Isolator
  2. JustMock
  3. Moles(只能存根方法,你不能斷言它們)。使用僞造隔離靜態方法的

例子:

Isolate.WhenCalled(() => MyClass.MethodReturningZero()).WillReturn(1); 

免責聲明 - 我在Typemock

+4

+1工作完全公開! – Fenton 2010-09-07 13:02:40

+4

-1只鏈接你自己的產品...找JustMock這裏: http://www.telerik.com/products/mocking.aspx和痣的位置: http://research.microsoft.com/en-us /項目/摩爾/ – 2010-09-26 16:33:17