-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@DisplayNameGeneration
is not discovered on runtime enclosing type for @Nested
test class
#4131
Closed
2 tasks done
Comments
1 task
Team decision: Investigate feasibility after #4130 has been addressed. |
hello @sbrannen, I would love to work on this issue, would you please assign it to me? |
@abdelmawla56 I'd be happy to but #4130 should be done first because we think there'll be a large overlap. That's why this issue is currently labeled as "blocked". |
marcphilipp
added a commit
that referenced
this issue
Jan 25, 2025
6 tasks
6 tasks
marcphilipp
added a commit
that referenced
this issue
Jan 26, 2025
marcphilipp
added a commit
that referenced
this issue
Jan 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
@DisplayNameGeneration
is currently discovered on the current test, a superclass, or the enclosing class in which aNested
test class is declared. However, the runtime type of an enclosing instance is not always the class in which a@Nested
test class is declared.Example
The examples here are copies of those in #4130 except that
@IndicativeSentencesGeneration
has been moved fromAbstractBaseTests
toScenarioOneTests
.Actual Behavior
When running
ScenarioOneTests
, we currently see the following display names, since@IndicativeSentencesGeneration
is not honored (i.e., the@DisplayNameGeneration(IndicativeSentences.class)
meta-annotation is not discovered).ScenarioOneTests
NestedTests
test()
Expected Behavior
When running
ScenarioOneTests
, we would expect the following display names before #4130 is resolved.ScenarioOneTests
AbstractBaseTests, NestedTests
AbstractBaseTests, NestedTests, test()
When running
ScenarioOneTests
, we would expect the following display names after #4130 is resolved.ScenarioOneTests
ScenarioOneTests, NestedTests
ScenarioOneTests, NestedTests, test()
Related Issues
DisplayNameGenerator
cannot access runtime enclosing type for@Nested
test class #4130Deliverables
@DisplayNameGeneration
is discovered on the runtime enclosing type for a@Nested
test class.The text was updated successfully, but these errors were encountered: