Basic Introduction to writing unit tests with Moq - Part 3

This post is the third part of a series on Mocking with Moq. If you haven't already taken a look at the first two posts on the basics of Moq, please check it out. Mocking a method within the same class So, recently I came across a problem where I…

Test your MVC routes with Moq

Routing is a great feature that ships with MVC. The ASP.NET Routing module is responsible for mapping incoming browser requests to particular MVC controller actions. One of the great things about routing in MVC is the ability to rewrite a URL and make it a lot more readable. This…

Basic introduction to writing unit tests with Moq - Part 2

This post is the second part of a series on Mocking with Moq. If you haven't already taken a look at the first post on the basics of Moq, please check it out. In this post, I hope to cover some other basic aspects of mocking such as Verifying, Exceptions…

Basic Introduction To Writing Unit Tests With MOQ

What is mocking? Well....according to Wikipedia it is: "In object-oriented programming, mock objects are simulated objects that mimic the behavior of real objects in controlled ways. A computer programmer typically creates a mock object to test the behavior of some other object" In short,¬†Mock objects¬†are…