JUnit
-
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 » -
Core Java

Testing for expected exceptions in JUnit
Unit tests are used to verify that a piece of code operates as the developer expects it to. Sometimes, that…
Read More » -
Core Java

Access private fields in unit tests
First of all, let me say out louder, you need to design your code to be testable, so you test…
Read More » -
Desktop Java

More Units with MoreUnit
Just over a year ago I wrote a post about working with JUnit in Eclipse. One of the commenters recommended…
Read More » -
Core Java

Introduction To JUnit Theories
Have you ever read a mathematical theory? It typically reads something like this: For all a, b > 0 the…
Read More » -
Core Java

Parameterized JUnit tests with JUnitParams
Parameterized unit tests are used to to test the same code under different conditions. Thanks to parameterized unit tests we…
Read More » -
Core Java

Run, JUnit! Run!!!
JUnit together with JavaScript and SVN are some of the technologies that programmers often start using without even reading a…
Read More »

