开发者

ASP.NET MVC - Ready to use ControllerContext mock

I studied several samples, including one here, and basically all I need to know is whether there is something new in the field.

The greatest thing would be having some ready-to-use thoroughly tested by multiple real-life uses class / method that will return me the mock of ControllerContext for unit testing ASP.NET MVC cont开发者_运维问答rollers. One more desirable feature is not having to worry about what to mock, what not to mock - I just want a fully functional context. Maybe, I will not need 90% of its functionality, but that's ok. Is there something that sweet?

The solution may use some Mock framework, but it is not necessary - I just need the result out from black box. If this box is not actually black, that's better, of course.

Thanks!


Personally I would recommend you MVCContrib TestHelper. It will make your controller unit tests very elegant and you shouldn't worry about mocking the context.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜