Monthly Archives: May 2014

Hamcrest JSON Matchers

I couldn’t find a Hamcrest matcher for JSON that worked how I wanted, so I adapted the JsonAssert library. This allows you to use dot notation to specify the path to a node in a json string, and use any

Posted in Clean Test Code, Hamcrest

Why Clean Code Matters

An old favourite: For three days and nights the Java master did not emerge from his cubicle. On the fourth day the monks of the temple sent a novice to inquire after him. The novice found the master at his

Posted in Uncategorized

Dangerous Words

A department trialing the use of agile in a predominantly waterfall organisation sent a status update to the traditionalists in program management. It contained the phrase “backlog of technical debt”. To us in the Scrum world, that means one thing,

Posted in Uncategorized

Scrum Task Board Tips

Call it your story wall, call it your agile board, call it your scrum wall, call it what you like. I call it a task board, and I like to keep it simple. If you’re in a situation where you

Posted in Agile

Bean Mapping With ModelMapper

I’ve never found a satisfactory method for mapping bean properties. They always add too much ugly set-up code, especially for conditional mapping or type conversions. Perhaps ModelMapperĀ is the best so far. Let’s say you have a source bean with a

Posted in Java

Loading Resources In Tests

Some level of tests, let’s call it integration testing because it’s not technically unit testing, often need to load resources like XML samples from the file system. A talented developer I worked with recently, came up with this nice use

Posted in Clean Test Code, JUnit, JUnit Rule

Names Should Be Expressive When Writing Tests

It is still surprisingly common to see test methods named “test” followed by the name of a some method that’s going to be called. Sometimes you get a few words mentioning some other internal detail, like This sucks. I’m amazed

Posted in Clean Test Code, JUnit