DevPinoy.org
A Filipino Developers Community

>>> First two to make 3 wins! <<<

TDD Demo 2a, Income Tax Calculator, not TDD ("god" class)


posted by cruizer
10-05-2006

Downloads: 309
File size: 40.5kB
Views: 578
TDD Demo 2a, Income Tax Calculator, not TDD ("god" class)
Filed under: , , ,
Demo code used for the Red-Green-Refactor for .NET talk on Oct 5 2006.

This code calculates a person's income tax. This shows how *NOT* to do code, since this is not unit-testable and is not test-driven. It also bunches up all its functionality into a single class (a "god" class) which is a violation of the Single Responsibility Principle (SRP).

Copyright DevPinoy 2005-2008