Skip to content

Instantly share code, notes, and snippets.

@b1a9id
Last active January 17, 2018 08:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
class StringsValueParameterizedTestDemo {
private Person person1;
private Person person2;
@BeforeEach
void beforeEach() {
person1 = new Person("Ryosuke", "Uchitate", 27, Gender.MAN);
person2 = new Person("Taro", "Uchitate", 20, Gender.MAN);
}
/**
* Value Source
*/
@ParameterizedTest
@ValueSource(strings = {"Ryosuke Uchitate", "Taro Uchitate"})
void stringsValue(String fullName) {
List<String> personFullNameList = Arrays.asList(person1.getFullName(), person2.getFullName());
assertTrue(personFullNameList.contains(fullName));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment