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 String c = "ccc";

 

 @Theory

 public void stringTest(String x, String y) {

  assumeTrue(x.length() > [...]

Mixins, Inheritance and Delegation

A week ago I started learning Scala. One of the features I found pretty interesting are mixins and traits. That was just the point of time, when I read this little tweet of GeekyL:
“i am still not sure if mixins are super cool or dark magic.”
Of course I was instantly reminded of the time when [...]

Moving a Server Certificate and Private Key from Windows to a Java Key Store

Some days ago I was asked to set up a tomcat server for SSL. You’d think this is a no brainer. And it actually is when you proceed along the paved path. But if you deviate only a little, you are in big trouble. I solved the trouble I got in, and here is my [...]

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

Passwortprüfung in Java

Single Sign On ist in weiten Bereichen immer noch ein frommer Wunsch, und so kommt es, dass immer noch jede neue Anwendung eine Log On Maske benötigt, und zu einer solchen Log On Maske gehört natürlich das Eingabefeld für das Passwort.
Mit dieser Aufgabe befinden sich wohl die allermeisten Entwickler auf ganz dünnem Eis. Wir sprechen [...]

Posted in: Softwaredevelopment by Jens Schauder 1 Comment , ,