JUnit
-
Core Java
Writing Clean Tests – Divide and Conquer
A good unit test should fail for only one reason. This means that a proper unit test tests only one…
Read More » -
Enterprise Java
Writing Clean Tests – Replace Assertions with a Domain-Specific Language
It is pretty hard to figure out a good definition for clean code because everyone of us has our own…
Read More » -
Core Java
Writing Clean Tests – Beware of Magic
It is pretty hard to figure out a good definition for clean code because everyone of us has our own…
Read More » -
Core Java
Writing Clean Tests – It Starts from the Configuration
It is pretty hard to figure out a good definition for clean code because everyone of us has our own…
Read More » -
Core Java
Yet another way to handle exceptions in JUnit: catch-exception
There are many ways of handling exceptions in JUnit (3 ways of handling exceptions in JUnit. Which one to choose?,…
Read More » -
Core Java
JUnit ExpectedException rule: beyond basics
There are different ways of handling exceptions in JUnit tests. As I wrote in one of my previous posts, my…
Read More » -
Core Java
Getting JUnit Test Names Right
Finding good names is one of the challanges of crafting software. And you need to find them all the time…
Read More » -
Enterprise Java
Parameterized JUnit tests
Sometimes you encounter a problem that just screams for using “parameterized” tests rather than copy/pasting the same method many times.…
Read More » -
Enterprise Java
HOW-TO: Test dependencies in a Maven project (JUnit, Mockito, Hamcrest, AssertJ)
JUnit itself is not enough for most of today’s Java projects. You also need a mocking library, maybe something else.…
Read More »