Use Cases for JUnit Rules

Sometime ago I blogged about JUnit @Rule Annotation. In the meantime I got the chance to use rules in a real project. I must say: Rules rock! Let me tell you about my use cases. I am working on a Swing project (It’s OK, it’s not as bad as it sounds). We have many tests [...]

Posted in: Softwaredevelopment by Jens Schauder 4 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 5 Comments , , ,