On Apr 11, 2008, at 3:59 PM, Vincent Massol wrote:
[snip]
> Actually I would love to know the xwiki guideline
for writing unit
> tests:
> testing particular functions (I wrote a function, I need to test it)
The most important rule is that you should write the tests first (TDD)
or at the very least before you commit anything.
You'll find that your code by definition is testable and nicely
designed.
TDD and unit tests are actually a design technique even before being a
way to verify that the code works.
What is hard is writing unit tests for badly written legacy code...
Thanks
-Vincent