Last active
December 17, 2015 18:29
-
-
Save ktoso/5653893 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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