Last active
January 17, 2018 08:57
-
-
Save b1a9id/c37b9f1280c9415cdd69233bdcb1e3f6 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 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