Blog Posts for: Mocks

Mocking an abstract class using NSubstitute

15 October 2013

For the development of One Love, I make use of the wonderful MvvmCross library for implementing the MVVM pattern. This allows me to have a LOT of shared code across all platforms, and also allows me to implement unit testing across all that shared code. There are of course certain things which are platform specific and for that I use the dependency injection which comes standard with MvvmCross. For the unit tests I use a mocking framework to create mocks which are then passed into the constructors of the classes under test.

How TDD assists me

19 April 2013

There are a lot of reasons why people suggest you should do Test Driven Development, and even though I was not a total convert right from the beginning, the practice is growing on me. My situation is a bit unique from probably most developers out there, so while I buy into a lot of the common reasons why you should do TDD, there are a few unique advantages I gain from it.