Skip to content

Instantly share code, notes, and snippets.

@ktoso
Last active December 17, 2015 18:29
Show Gist options
  • Save ktoso/5653893 to your computer and use it in GitHub Desktop.
Save ktoso/5653893 to your computer and use it in GitHub Desktop.
// or even more plain:
testCases.foreach((case) -> {
// given
Object given = case.given;
Object expected = case.expected;
it.should("return [%s] when applied to [%s]", given, expected, system -> {
// when
Object got = system.doThing(given);
// then
assertThat(got).isEqualTo(expected);
});
});
it.should("return an expected value").forAll(testCases, (system, given, expected) -> {
// when
Object got = system.doThing(given);
// then
assertThat(got).isEqualTo(expected);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment