Mock static property with moq

前端 未结 6 1922
我在风中等你
我在风中等你 2020-11-28 08:37

I am pretty new to use moq. I am into creating some unit test case to HttpModule and everything works fine until I hit a static property as follows

6条回答
  •  粉色の甜心
    2020-11-28 09:09

    You can use Microsoft Fakes for this. It will definitely solve the issue. Refer to https://msdn.microsoft.com/en-us/library/hh549175.aspx

提交回复
热议问题