Trifork Blog

Posts Tagged ‘JUnit’

Using Hamcrest Matchers.everyItem

February 19th, 2011 by
(http://blog.trifork.com/2011/02/19/some-trouble-with-getting-the-right-version-of-hamcrest-and-the-solution/)

For my Junit test I wanted to make use of Matchers.everyItem so I could easily check if every item of a list machtes a certain matcher. Resulting in a small line of code which is nice to read.

Read the rest of this entry »

Testing the database layer

July 1st, 2009 by
(http://blog.trifork.com/2009/07/01/testing-the-database-layer/)

The database is an integral part of many applications and writing queries is often hard. For that reason I have always written integration tests for the data access objects or DAO’s that I use to access the database. The way I write my DAO tests has changed a lot over the years and in this post I’d like to document the ways in which it has changed and why.

Read the rest of this entry »