Sela Developer Practice 2013

I’m speaking at SDP2013 – two weeks from now.     I’ll be talking about mocking (surprise!) in “Battle of the Mocking Frameworks”.   So if you’re happen to come to the conference on May 7th – drop by and say hi.   Until then – happy coding…

How to: Invoke events inside your production code using Typemock Isolator

 Using Isolate.Invoke.Event enable event driven unit testing by invoking events on fake or “real” object. If you use events to communicate between parts of your application – it’s a feature you need to know and use. In the last couple of months I have been using it a lot but there is one wall I … Continue reading How to: Invoke events inside your production code using Typemock Isolator

Unit testing custom StyleCop rules using Typemock Isolator

I’ve never was a big fan of “coding standard” – Although I always thought that the same style should be kept throughout a project or even the entire company’s code base - the idea of forcing developers to write the same code based on a document nobody ever read seemed just wrong. Fast forward a … Continue reading Unit testing custom StyleCop rules using Typemock Isolator

Getting started with Fake Objects – Part 3: Verify that a call has been made

If you haven’t read the other posts in this trilogy - you might what to have a look at them about now: Why fake is better then mock How to create a fake object Let’s begin the third part of this tutorial where I’ll explain what to do when we need to test that a … Continue reading Getting started with Fake Objects – Part 3: Verify that a call has been made

Getting started with Fake Objects – Part 2: How to create a fake object

In the previous post I’ve explained (briefly) what are fake objects and why they should be used – if you haven’t read it yet – I suggest you do so now. In  a nutshell fake objects are used to break dependencies in unit tests to make the test faster, predictable and enable you to test … Continue reading Getting started with Fake Objects – Part 2: How to create a fake object

Getting started with Fake Objects – Part 1: why fake is better then mock

If you’ve been writing unit tests for a short while you might have noticed that writing good unit tests is hard. The object under test can be hard to create because it require dependencies that you just cannot provide or some complicated environment is needed just to make the test pass. When writing a unit … Continue reading Getting started with Fake Objects – Part 1: why fake is better then mock

How to unit test “un-testable” code (in a nutshell)

Not being able to unit test an essential scenario is one of the reasons developers stop unit testing their code. In fact most of the time when a team decides not to use TDD (Test Driven Development) is because it seems as if they won’t be able to test the production code using unit tests. … Continue reading How to unit test “un-testable” code (in a nutshell)