Juan-Carlos Gandhi (
juan_gandhi) wrote2007-03-27 04:35 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
bug of the day
Call a method in a unittest like this:
And you will be pleasantly surprised later by the fact that junit does not run this test!
public void textHighLightWithPlaceholders() {...
And you will be pleasantly surprised later by the fact that junit does not run this test!
no subject
It works especially well, if you have a big hierarchy (some sort of framework) of test classes, and you you use this method to initialize generic infrastructure in the base class of this hierarchy ...
no subject
And then, while writing a test class, extending the base class (preferably indirectly), call super.setUp() AT THE END of your setUp() method ...
Disclaimer: I didn't write it this way, I just had to debug it :)