JaVa
   

Summary

In this chapter, we discussed the typical approach taken in test-driven development and its numerous small micro-iterations, using the dictionary coding example from . More specifically, we demonstrated both the development of a single class and how this class can be separated into a parser and the actual dictionary. The result of our test-first development clearly looks different from the previous solution designed in , . This means that the test-driven approach is not only a means to reduce program errors, but it also directs the system design towards as few internal and external dependencies as possible. The answer to the question How should I test something I don't know yet? is, therefore: I test it because I don't know it yet! But despite the designing by testing approach, a rough preliminary design is helpful to generate ideas if you are prepared to deviate from it when the implementation leads you somewhere else. Finally, we focused on issues that come up when using JUnit for increasingly larger apps:


JaVa
   
Comments