New Feature of JUnit: Theories

A couple of months ago I blogged about JUnit Rules, one of the new features in JUnit. While fooling around with JUnit Rules, I found a couple more features that you might be interested in. So here it comes: Theories! It turns out Theories are really a piece of cake. Try this:

import static org.junit.Assume.assumeTrue;

import org.junit.experimental.theories.DataPoint;

import [...]

Posted in: Softwaredevelopment by Jens Schauder 3 Comments , ,

New Feature of JUnit: Rules

I am always surprised how many unknown feature hide in a supposedly simple library. Todays example is JUnit. When inspecting the newest version (4.7) I noted an annotation I hadn’t noticed before: @Rule. WTF? I am looking at a testing framework and not at a rules engine, am I? So naturally I tried to find [...]

Posted in: Softwaredevelopment by Jens Schauder 3 Comments , , ,