In a previous blog we described how we used JUnit and Reflection to verify correct implementation of coding standards addressing Axon Upcaster consistency. We concluded that, although possible, it felt a bit like a hack because we had to change modifiers of Java variables defined as “private static final” resulting in Java security manager warnings. […]
Unit Testing Source Code: Verifying Axon Event Upcaster Consistency
In our last project we used a JUnit test to check consistency of all code concerned with Axon event upcasting. We think this is interesting as we basically unit test source code rather than class behavior. In this blog we describe how we implemented it and conclude with a short evaluation and we list alternative […]
Using Hamcrest Matchers.everyItem
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.
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 […]