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
While updating the Spring Framework test suite after the fixes for #4130 and #4131, I noticed that it's currently not possible to provide a custom display name for a "sentence fragment" for the IndicativeSentencesDisplayNameGenerator.
You can of course register a custom DisplayNameGenerator (such as ReplaceUnderscores) to affect how a sentence fragment is generated, but you cannot provide an entire custom sentence fragment.
If you attempt to use @DisplayName for a sentence fragment, the entire sentence (that would otherwise be generated by the IndicativeSentencesDisplayNameGenerator) gets overridden by the value of the @DisplayName.
As a proof of concept, I implemented @SentenceFragment and a corresponding SentenceFragmentDisplayNameGenerator) in this commit for Spring Framework's test suite.
Deliverables
Introduce support for @SentenceFragment directly in IndicativeSentences.
The text was updated successfully, but these errors were encountered:
Overview
While updating the Spring Framework test suite after the fixes for #4130 and #4131, I noticed that it's currently not possible to provide a custom display name for a "sentence fragment" for the
IndicativeSentences
DisplayNameGenerator
.You can of course register a custom
DisplayNameGenerator
(such asReplaceUnderscores
) to affect how a sentence fragment is generated, but you cannot provide an entire custom sentence fragment.If you attempt to use
@DisplayName
for a sentence fragment, the entire sentence (that would otherwise be generated by theIndicativeSentences
DisplayNameGenerator
) gets overridden by the value of the@DisplayName
.As a proof of concept, I implemented
@SentenceFragment
and a correspondingSentenceFragmentDisplayNameGenerator
) in this commit for Spring Framework's test suite.Deliverables
@SentenceFragment
directly inIndicativeSentences
.The text was updated successfully, but these errors were encountered: