about me about me
photography photography
software projects software projects
contact me contact me

When writing unit tests, it’s often useful to know the code coverage you’ve achieved to see what proportion of your code you’re exercising. Typically you have to commit your code to version control, so your CI server can pull in your updates and produce coverage reports. This means you sometimes commit incomplete tests, where you might forget to test failure branches (throwing exceptions for example).

code coverage report

Read the rest of this entry »

I occasionally need the list of method parameter matchers when setting assertions via mocks using with(). A completely useless example:


Read the rest of this entry »