File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
main/java/guru/springframework/sfgpetclinic/model
test/java/guru/springframework/sfgpetclinic/model Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ package guru .springframework .sfgpetclinic .model ;
2+
3+ public enum OwnerType {
4+ INDIVIDUAL , COMPANY
5+ }
Original file line number Diff line number Diff line change 55import org .junit .jupiter .api .Tag ;
66import org .junit .jupiter .api .Test ;
77import org .junit .jupiter .params .ParameterizedTest ;
8+ import org .junit .jupiter .params .provider .EnumSource ;
89import org .junit .jupiter .params .provider .ValueSource ;
910
1011import static org .junit .jupiter .api .Assertions .*;
@@ -34,4 +35,10 @@ void testValueSource(String val){
3435 System .out .println (val );
3536 }
3637
38+ @ DisplayName ("value source test - " )
39+ @ ParameterizedTest (name = "{displayName} [{index}] {argumentsWithNames}" )
40+ @ EnumSource (OwnerType .class )
41+ void enumTest (OwnerType ownerType ){
42+ System .out .println (ownerType );
43+ }
3744}
You can’t perform that action at this time.
0 commit comments