Skip to content

Instantly share code, notes, and snippets.

@beyondxscratch
Created July 14, 2022 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beyondxscratch/73abcd86bf1dc95b21cbe381db82653c to your computer and use it in GitHub Desktop.
Save beyondxscratch/73abcd86bf1dc95b21cbe381db82653c to your computer and use it in GitHub Desktop.
@ParameterizedTest
@MethodSource("somePeople")
void a_test_with_method_source(String name, int age, Month birthMonth) {
// ...
}
private static Stream<Arguments> somePeople() {
return Stream.of(
Arguments.of("Alice", 25, JUNE),
Arguments.of("Bob", 32, AUGUST)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment