Sorting out the bits

In the last chapter, there has been a lively conversation between Johnny and Benjamin. Even in such a short session, Benjamin, as a TDD novice, had a lot of questions and a lot of things he needed to be sorted out. We will pick up all those questions that were not already answered and try to answer in the coming chapters. Here are the questions:

  • How to name a Statement?
  • How to start writing a Statement?
  • How is TDD about analysis and what does this “GIVEN-WHEN-THEN” mean?
  • What exactly is the scope of a Statement? A class, a method, or something else?
  • What is the role of TODO list in TDD?
  • Why use anonymous generated values instead of literals as the input of a specified behavior?
  • Why and how to use the Any class?
  • What code to extract from a Statement to shared utility methods?
  • Why such a strange approach to creating enumerated constants?

A lot of questions, isn’t it? Unfortunately, TDD has this high entry barrier, at least for someone used to the traditional way of writing code. Anyway, that is what this tutorial is for – to answer such questions and lower this barrier. Thus, we will try to answer those questions one by one.