JUnit
-
Enterprise Java
Fault Injection with Byteman and JUnit
The time when our applications lived in isolation have passed long-long ago. Nowadays applications are a very complicated beasts talking…
Read More » -
Enterprise Java
Running JUnit Tests Repeatedly Without Loops
Recently I came across a problem where I had to write tests for a method that calculates randomly distributed values…
Read More » -
Enterprise Java
JUnit: Naming Individual Test Cases in a Parameterized Test
A couple of years ago I wrote about JUnit Parameterized Tests. One of the things I didn’t like about them…
Read More » -
Enterprise Java
JUnit and EasyMock cooperation
Developers always need to take care about code which they produced. They should be ensured that code works properly after…
Read More » -
Core Java
Testing Expected Exceptions with JUnit Rules
This post shows how to test for expected exceptions using JUnit. Let’s start with the following class that we wish…
Read More » -
Enterprise Java
Don’t rely on unit tests alone
When you are building a complex system, barely testing components in isolation is not enough. It’s crucial, but not enough.…
Read More » -
Enterprise Java
Hamcrest Containing Matchers
The Hamcrest 1.3 Javadoc documentation for the Matchers class adds more documentation for several of that class’s methods than were…
Read More » -
Core Java
JUnit test method ordering
Junit until version 4.10 uses the order of test methods in a test class as returned by the reflection API…
Read More » -
Enterprise Java
Using Builder Pattern in JUnit tests
This is not intended to be a heavily technical post. The goal of this post is to give you some…
Read More »