Note: This article has been excerpted from my upcoming book, Get Programming with F#. It provides an overview of different “levels” of unit testing, and how and where they’re appropriate in F#. We’ll also discuss different forms of unit testing practices, including test driven development (TDD), and finally see how to write simple unit tests … Continue reading When to Unit Test in F#
Latest features on JustMockLite
Just a quick post and update on my review on JustMockLite from earlier this year. I had originally a few comments on some features which I'm pleased to say have now been rectified 🙂 Recursive Mocks Support (or lackof) for recursive mocks was one of my main criticisms with earlier versions of JML. For example, … Continue reading Latest features on JustMockLite
Using wrappers to aid unit testing
As I alluded to about recently when blogging about JustMock, one of the most important attributes of unit tests has to be that they are readable; you can easily reason about them and see what they do. I also talking about Moq’s overly cumbersome and verbose approach to performing Setups on mocks – I rarely … Continue reading Using wrappers to aid unit testing
First experiences of Telerik’s JustMock
Problems with Moq Having migrated from Rhino Mocks over to Moq, I have found myself lately getting more and more frustrated with the verbosity of Moq for simple assertions. I present as exhibit one the GetPayroll method, called below. I want to assert that I call the Log method with the result of GetPayroll. So … Continue reading First experiences of Telerik’s JustMock
Why Entity Framework renders the Repository pattern obsolete?
A post here on a pattern I thought was obsolete yet I still see cropping up in projects using EF time and time again... What is a Repository? The repository pattern – to me – is just a form of data access gateway. We used it to provide both a form of abstraction above the … Continue reading Why Entity Framework renders the Repository pattern obsolete?
Call Counting when unit testing
I’ve been trying out the free version of TypeMock solator (TMI) recently – basically does the same sort of thing as Rhino Mocks / Moq i.e. mocking of interfaces and virtual methods. Although it’s undoubtedly not as common or popular as those two long-established free frameworks (yet), it has a very clean API, and thankfully … Continue reading Call Counting when unit testing
A few words on the growing popularity of Test Driven Development
TDD seems to be more and more a buzzword these days than years gone by, particularly in the .NET world. Every agent and potential employer seems to be interested in it. Yet I see more and more people that are chucking around the TDD word on their CVs / LinkedIn profiles and don’t even use … Continue reading A few words on the growing popularity of Test Driven Development
What is Unit Testing not?
An ex-colleague of mine was telling me about a situation that he experienced on a project recently whereby his team had written a comprehensive unit test suite for a component designed to generate XML files for consumption in another system. Their code passed all the unit tests, yet when they delivered the component to the … Continue reading What is Unit Testing not?
Unit Testing – testing class contracts
It’s been a while since I last posted, and I thought I’d write something that often gets overlooked when unit testing – what the boundary is for a given set of unit tests. When you write unit tests on e.g. a public method on a class, something that you need to keep in mind is … Continue reading Unit Testing – testing class contracts
Fitnesse on .NET
I've recently been looking at Fitnesse and integrating it into our application in order to provide our BAs with more confidence in the code we deliver as well as reduce the time it takes for non-developers to test our code out. A lot of our application is data centric, with complex logic carried out under … Continue reading Fitnesse on .NET