Using Moq callbacks as Verify

One thing using Moq [http://code.google.com/p/moq/] always bugged me. When needing to verify some method call, Moq provides a Verify-metod on the Mock object: So, what’s wrong with this piece of code? In fact nothing (if you ask me). The “problem” is the error message…

Unit-testing HtmlHelper extension methods

I sometimes find myself doing extension methods for the HtmlHelper class in ASP.NET MVC. I like HtmlHelper, but I don’t really dig when the methods generate HTML. This is what partial views are for, right? I usually add small utility methods related to a single view on the…