Introducing the Unit Testing Context Pattern
Another pattern? Well yes. I write unit and integration tests almost every day and along the way i learned all kinds of different tricks and gotchas on how to be more productive and how to write less fragile tests. But one of the patterns that emerged i never saw in the code of other people so i decided to share it here since i find it very useful. I call it Testing Context Pattern and – unlike it’s name – its very simple. Idea is to create in your Test Fixture a private class called (you guessed it) TestContext and put…