Friday November 27th

Thursday November 26th

Wednesday November 25th

1 Kicks

Mocking ASP.NET MVC HtmlHelper using Moq

HtmlHelper is used quite frequently in ASP.MVC. It has a number of dependencies, so testing the numerous extension methods on it (both default, and added) can make for some ugly code. This simple code sample shows how to mock out the dependencies (ViewContext for one) using Moq.


Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network