You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, junit5 is a great piece of software. Today I realized while testing that a lot of time doing unit testing the @DisplayName is almost the same as a name of method. I mean there are many schools how the name of method should look like, but for example, let's take a look at this one below:
methodName_StateUnderTest_ExpectedBehavior
And here is my idea - create a flag, for example Test(xxx=true) or Test(xxx="_") or DisplayName(xxx="_") which will use the name of method. The final result may look like this:
parse_WithEmptyString_ThrowIllegalArgumentException
will be converted to parse with empty string throw illegal argument exception
Let me know what you think.
The text was updated successfully, but these errors were encountered:
#162 would introduce support for achieving this in the form of an extension, likely with a default implementation that "prettifies" based on either camel-casing or underscores (or potentially both).
If you would specifically like support for splitting on underscores, please voice your opinion in #162.
Overview
Hi, junit5 is a great piece of software. Today I realized while testing that a lot of time doing unit testing the
@DisplayName
is almost the same as a name of method. I mean there are many schools how the name of method should look like, but for example, let's take a look at this one below:methodName_StateUnderTest_ExpectedBehavior
And here is my idea - create a flag, for example
Test(xxx=true)
orTest(xxx="_")
orDisplayName(xxx="_")
which will use the name of method. The final result may look like this:parse_WithEmptyString_ThrowIllegalArgumentException
will be converted to
parse with empty string throw illegal argument exception
Let me know what you think.
The text was updated successfully, but these errors were encountered: