Test driving interactions using Async and Await

Saturday, September 15, 2012

From time to time I encounter a problem that seems pretty straight-forward to implement without TDD, but very cumbersome to do with TDD. Most of these cases have something in common: they describe interactions between the tested component and external parties. These external parties can be either the user, external system, or any kind of communication protocol. Here’s the simplest example I could think of: This is a simple console application that asks the user for his name, and then greets him with “Hello, “, followed by his name. Writing this application takes exactly 3...