---
title: "Chapter 5 - Mock Object Frameworks - Done"
url: "https://osherove.com/blog/2007/6/7/chapter-5-mock-object-frameworks-done.md"
canonical: "https://osherove.com/blog/2007/6/7/chapter-5-mock-object-frameworks-done.html"
published: "2007-06-07T00:22:36"
updated: "2007-06-07T00:22:36"
tags: ["Agile", "Art Of Unit Testing"]
author: "Roy Osherove"
description: "Last night I finally Finished chapter five in my upcoming book about unit testing . Chapter five was all about Mock Object frameworks and was the longest and hardest to write so far. Some of the reasons it was hard to…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Chapter 5 - Mock Object Frameworks - Done

By Roy Osherove June 7, 2007 In [Agile](https://osherove.com/blog/category/agile), [Art Of Unit Testing](https://osherove.com/blog/category/art-of-unit-testing)

**Historical article** · Originally published June 7, 2007; technical details may be outdated.

Last night I finally Finished chapter five in my [upcoming book about unit testing](http://artofunittesting.com/). Chapter five was all about Mock Object frameworks and was the longest and hardest to write so far. Some of the reasons it was hard to write this:

- It took me a long time to decide which mock framework I'll be using for my examples. I ended up choosing [Rhino.Mocks](http://www.ayende.com/projects/rhino-mocks.aspx) after running [this little survey on my blog](http://weblogs.asp.net/rosherove/archive/2007/04/26/choosing-a-mock-object-framework.aspx). The truth is, the Mocking framework scene in .NET is not as great as it could be (I.e it sucks). Most of the big free frameworks are not being actively developed (EasyMock, NMock and NMock2), and the ones who are active are basically a one person army which is also bad (Rhino.Mocks is that). The only good framework that would fit the book in terms of both features and _long_ lasting supportability security is [TypeMock](http://www.typemock.com/) which is commercial so I did not want to use it. Rhino Mocks came a close second with feature set and active development, but it's still  a one person show for now which makes it dangerous to use in a book (who knows where it will be in a year).
- It took me a long time to figure out how to really explain my thoughts on mock frameworks vs. hand written mocks and stub, and what features I should cover vs. what features I should leave out. The most important features are there, but I am leaving a "hardcore" review of RhinoMocks itself for an appendix chapter that will be written by Ayende himself.
- Taking care of a new baby and doing full time work can be challenging even without writing a book. That meant the book writing kept getting delayed.
- The chapter is long for what I've had so far (23 word pages). I've seen longer chapters, but for me it's been a struggle with all these problems, and I kept pushing it further and further.
- Now starts an even harder part - I get to review all the editing comments on all five of the chapters from my editors. It's a time taking labor of very tiny things, and it really bruises you ego when you encounter it for the first time, because it shows yo hundreds of problems with your writing, or it forces you to sometimes rewrite parts that were (to your mind) perfect. I have to get used to this.

## More in Agile

[All posts in Agile](https://osherove.com/blog/category/agile)

- Jun 10, 2007

    ### [Tips for Testable code and for testing legacy code](https://osherove.com/blog/2007/6/10/tips-for-testable-code-and-for-testing-legacy-code.html)

- Jun 7, 2007

    ### [List of Unit Testing Frameworks](https://osherove.com/blog/2007/6/7/list-of-unit-testing-frameworks.html)

- Jun 6, 2007

    ### [Scrum - What it looks like in the real world](https://osherove.com/blog/2007/6/6/scrum-what-it-looks-like-in-the-real-world.html)

- May 30, 2007

    ### [Automating web tests with FitNesse and Selenium](https://osherove.com/blog/2007/5/30/automating-web-tests-with-fitnesse-and-selenium.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
