Building Solution Code with BDD and TDD
Now that we have gone through the fundamentals of writing test programs using test-driven development (TDD) and behavior-driven development (BDD), we can start using both processes in developing our example application. When working on commercially successful and large-scale applications, one thing is common: they all need maintenance. There will always be room for improvement in terms of the product’s functionality. There could be some bugs that were missed, and—more commonly—more features to improve the product will continuously be added to the application. This is usually how badly written code gets worse. A nicely written class can end up being a god class: a class that can do everything with a few thousand lines of code. A developer can start writing additional functions inside the god class while another developer is using that class, therefore changing the class’s behavior. You can guess what happens next! A...