In Memory

The Simple Way To Keep Thoughts

I'm @sstude, I'm a software developer. This is my blog where I post (sometimes :) notes about my dev life. Follow me on Twitter and don't hesitate to ask any questions or share any interesting ideas!

Blog Projects Twitter Github

One week ago I gave another talk inside our company. This time I also was talking about unit testing, but from the other point of view.

You can guess from the title of this post, that the talk was about fake objects in unit testing and the way we build our fakes and mocks.

There are a lot of isolation frameworks available to create fake objects - open source and commercial, easy or hard to learn, old ones or the modern. BTW my first isolation framework I had learned was Moq. It has a simple API and pretty complete set of features to fake objects, their calls, properties. But while reading Roy Osherove's blog I read the post about "The future of Isolation frameworks" and became little bit familiar with the next generation frameworks - NSubstitute and FakeItEasy. I was impressed by the simplicity of the API and decided to try them.

Some time later I was talking with our technical lead and was surprised that he wants to use FakeItEasy as the isolation framework in the new project we will work on. That was the great news and the ability to use this framework on real-world application.

I was interested to tell about FakeItEasy inside my team, so I spent a few nights to prepare slides and some demo.

Let's use it and see how things may become simpler.

Read more