One of the more annoying aspects of testing EJBs has always been the fact you need to bundle them up in a JAR (and often an EAR) and deploy them to a server to thoroughly test them. This process drags out the development of unit tests, and makes life generally painful.
As of EJB 3, however, it’s no longer necessary. instead, it is fairly trivial to mock out the container entirely (and safely!)
Continue reading “Testing EJBs without a container”
The JavaMail API is a nice, simple, and effective API. But it’s got one problem: it’s a bugger to unit test. This is mostly because (unlike most other Sun Java APIs) there are no real interfaces in place, which makes it hard to mock pieces out. An excellent solution to this problem is Dumbster
Continue reading “Unit testing email”
Brian Duff gives a good example of a technique to get around visibility problems when unit testing. Believe it or not, this can be a good idea (and this is a strong TDD advocate saying this).
Continue reading “Unit testing privates, and other unsavoury topics”
Seeing all the comments today about using annotations to declare test cases reminded me that I never got around to writing about what I didn’t like about TestNG
Continue reading “What I don’t like about TestNG”
Bucky, who seems to write a bile-ish blog, thinks that test driven development is bad because he doesn’t like compile errors in his code. Because of that, he suggests writing the interface first.
Continue reading “Test Driven Development is not bad, mkay?”