19 Jan 2005

Testing difficulties

Quoting from xp book mailing list:
If it's hard to write a test, it's a signal that you have a design problem, not a testing problem. Loosely coupled, highly cohesive code is easy to test. --Kent Beck
First time I used JUnit, I had trouble because my components where tightly coupled and then couldn't be tested easly.
At first I thought I'll extend JUnit framework by subclassing TestCase and then I realized I should use IoC to get easy to test and therefore easy to use components.

No comments: