Last active
January 18, 2018 06:32
-
-
Save b1a9id/5cfe793470c2f4ce63383bb1dce7d47a 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
class MethodSourceMultiArgsParameterizedTest{ | |
@ParameterizedTest | |
@MethodSource("multiArgumentsProvider") | |
void multiArguments(String name, int age, Gender gender) { | |
assertFalse(name.length() > 100); | |
assertTrue( age > 0 && age < 30); | |
assertTrue(gender.name().length() > 1); | |
} | |
static Stream<Arguments> multiArgumentsProvider() { | |
return Stream.of( | |
Arguments.of("Ryosuke", 27, Gender.MAN), | |
Arguments.of("Hanako", 20, Gender.WOMAN) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment