Basic Steps of the Test-First Approach


Remember our introduction? It explained that the approach discussed in this tutorial is based mainly on the technique of writing a test before the actual program code to test this very code. Are we really serious about this? How should I test something that I don't know yet? Let us go back to the coding problem of , once again. We repeat the following requirements specification so you don't have to look back:

We want to program a dictionary to translate a German text into a language of our choice, say English. This dictionary, in the form of a class, Dictionary, is initialized with a word file and allows us to query the translation of a German word. The program should allow several translation alternatives.

Let's assume that we were really serious about the test-first claim. What would that approach look like in this example?