Skip to content

Commit bdce87f

Browse files
committed
junit parameterized tests - display name
1 parent d00a35c commit bdce87f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/guru/springframework/sfgpetclinic/model/OwnerTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package guru.springframework.sfgpetclinic.model;
22

33
import guru.springframework.sfgpetclinic.ModelTests;
4+
import org.junit.jupiter.api.DisplayName;
45
import org.junit.jupiter.api.Tag;
56
import org.junit.jupiter.api.Test;
67
import org.junit.jupiter.params.ParameterizedTest;
@@ -26,7 +27,8 @@ void dependentAssertions(){
2627
);
2728
}
2829

29-
@ParameterizedTest
30+
@DisplayName("value source test - ")
31+
@ParameterizedTest(name = "{displayName} [{index}] {argumentsWithNames}")
3032
@ValueSource(strings = {"one", "two", "three"})
3133
void testValueSource(String val){
3234
System.out.println(val);

0 commit comments

Comments
 (0)