I have found that quite a few programmers struggle to work in a completely test driven fashion. I myself whilst writing tests for many years, took a long time to move over to writing the test first. I think one of my problems was that I always wanted to do my thinking in [...]
1
2010
25
2010
Eclipse, Static imports quickly and GitHub gist.
Every one has a collection of favorite Eclipse templates. I find the simple ones are often the most useful. The examples below create you a static import and finish the method your typing. They even put the cursor in the right place if you need arguments in the method. I am going to collect more [...]
22
2009
Lessons on testing a JPA Dao
I wanted to explore unit testing JPA DAO and models. Hand crafting solutions is quite time consuming. I found something called Unitils which refines another project Dbunit. In theory it should significantly reduce the complexity and save some time. So one Saturday, I sat down to explore the space and write this blog.
16
2009
Test anti-patterns project, contributors wanted!
I deliberately wrote a poor quality test, so that I could show how easy it is to re-factor it to a better one. I was driven by having seen lots of such poor tests and to be honest I don’t want to see another of its ilk again. I might write a test like this myself, but I would never leave it like this. Its part finished, littered with cut and paste, poorly named methods and hard coded values.
I show how to re-factor the test using several patterns for test fixtures. The setup stage is often the worst bit of a bad test. If you want to contribute some of your own bad tests and example improvements, read the blog, download the project and contribute!
2
2009
5 reasons to upgrade Spring from 2.0 to 2.5
The anniversary of the announcement that Spring 2.5 was available is just around the corner. There are many reasons to upgrade the SpringFramework from 2.0 to 2.5. Spring 2.5 is designed as a drop-in replacement for 2.0 so there are no valid technical arguments for not upgrading. Here are my top 5 favorite features.