Adventures of a wannabe geek!

Ranting within

Satisfyr – Useful Little Addition to My Testing

I use a tool called Satisfyr. This tool helps me to keep to the 1 assert per test rule. It is a way to perform lambda-based assertions from within tests. It is written by Daniel Cazzulino (developer of World of VS and Moq to name a few things).

I use Satisfyr when I am testing translations between DTO and Business objects that go through an automapper layer. This allows me to turn this:

into this:

Its just syntactical sugar but it helps me to assert that an object is correct - this includes its properties etc. Hope it helps.