Category Archives: Moq

Unit Testing Simple ASP.NET MVC Controllers

I have created enough simple projects using ASP.NET MVC with unit tests to notice a very helpful pattern. The following is a sample of a test fixture using RhinoMocks and NUnit to test a controller. 1: [TestFixture] 2: public class … Continue reading 

Also posted in ASP.NET MVC, Development, DRY, NUnit, RhinoMocks | 6 Comments

Actually Querying with the Specification Pattern

In my previous post, I talked about using the specification pattern for querying collections. I didn’t actually show any code that does what I was talking about, I just showed the set-up and creation of specifications. The following is how … Continue reading 

Also posted in Design Patterns, DRY, Testing | 10 Comments