Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class ArgumentsSourceParameterizedTest{
void argumentSourceArgumentsStream(Person arg) {
assertTrue(arg.getFullName().contains(" "));
assertFalse(arg.getAge() < 0);
static class MyArgumentProvider implements ArgumentsProvider {
public Stream<? extends Arguments> provideArguments(ExtensionContext context) {
Person personA = new Person("Ryosuke", "Uchitate", 27, Gender.MAN);
Person personB = new Person("Taro", "Uchitate", 20, Gender.MAN);
return Stream.of(personA, personB).map(Arguments::of);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment