Archive for the ‘Mocks/Stubs/Fakes’ Category

More On Test Doubles

For those of you who are attending my TDD class tonight, you’ll realize that I mentioned several times that learning to use test doubles effectively takes time… I’ve been using test doubles in my tests for half a decade and I still learn something new everytime. I’ve included some links to material to help you [...]

Mockito @Spy Annotation

In my previous post I went over some of the new annotations and annotation features available in Mockito with the 1.8.3 release and promised the following day I would post details on the @Spy annotation. Well, unfortunately practically a month has passed since then! But fear not, here is the overview of the @Spy annotation [...]

Fine Grained Stub Behavior With Mockito

Continuing a trend of Mockito related articles, I thought I’d blog about using another feature I recently discovered while trying to figure out how to implement fine grained behavior in mockito. First, let me set the stage… I had a method call I was writing examples for that was a typical Castor marshal operation, which [...]

Mockito: Verifying Details of an Object Passed to a Collaborator

Recently I was BDD’ing a class, and the behavior I needed to describe happened to be an object created internally (a simple value object) populated with a few attributes and passed to a collaborator. The old way I might be tempted to do this is just create a concrete implementation of the collaborator that stores [...]

Subscribe to RSS Feed Follow me on Twitter!