Skip to content

Instantly share code, notes, and snippets.

@schauder
Last active September 9, 2016 11:44
Show Gist options
  • Save schauder/e0a54e0c224246b335d76341f635546e to your computer and use it in GitHub Desktop.
Save schauder/e0a54e0c224246b335d76341f635546e to your computer and use it in GitHub Desktop.
class $12DynamicWithPixieDustTest extends LambdaBasedTests {{
List<Integer> ints = asList(Integer.MAX_VALUE, Integer.MIN_VALUE, -1, 0, 1, 2, 10);
for (Integer i : ints) {
for (Integer j : ints) {
test(format("adding integers is commutative (%d, %d)", i,j), () -> {
assertEquals(i + j, j + i);
});
}
}
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment