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 , , ,

More on JUnit Theories

In my last blog post, I described how to use JUnit Theories to create large amounts of test runs, with very limited amount of work, like so: import static org.junit.Assume.assumeTrue; @RunWith(Theories.class) public class TheorieTest {    @DataPoint  public static String a = "a";    @DataPoint  public static String b = "bb";    @DataPoint  public static [...]

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; [...]

Posted in: Softwaredevelopment by Jens Schauder 4 Comments , ,