-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
@ParameterizedTest(name = "...") provides feature to get it's argument value into it's name by using '{0}'.
The common use is that i want to use an Object within an argument (for example User).
In this case i have to go with providing another string argument into test source, that looks like
@ParameterizedTest(name = "I am testing user with name {0}")
void testUser(String userName, User user) {
...
}
But what people need is provide only User argument and access needed field through name (user.getName() or user.name):
@ParameterizedTest(name = "I am testing user with name user.name")
void testUser(User user) {
...
}
Please allow us to do this <3
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
sbrannen commentedon Mar 17, 2021
Closing as a duplicate of #1154.