Skip to content

Conversation

@mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Nov 22, 2025

  • Define test and container as non-exclusive properties.
  • Use emphasis to distinguish between term and word.
  • Document that TestDescriptor.Type values are exclusive properties.
  • Document that isContainer() and isTest() must be consistent with getType().
  • Document that getChildren(), getDescendants() and mayRegisterTests() must be consistent with isContainer().
  • Document that only the hierarchy of the test descriptor is mutable after discovery.

Fixes: #5168


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@mpkorstanje
Copy link
Contributor Author

mpkorstanje commented Nov 22, 2025

Draft for the purpose of team discussion.

Open questions:

  • Require isContainer() as a precondition to calling AbstractTestDescriptor.addChild?
  • Document that isTest, isContainer and getType should not be changed after discovery is complete? Does this apply to other properties too? If so, which?

@mpkorstanje mpkorstanje force-pushed the fix/document-test-type-consistency-requirements branch from 7bce0ed to 65eefdd Compare November 22, 2025 11:34
* Define test and container as non-exclusive properties.
* Use emphasis to distinguish between term and word.
* Document that TestDescriptor.Type values are exclusive properties.
* Document that `getChildren()`, `getDescendants()` and
  `mayRegisterTests()` must be consistent with `isContainer()`.
@mpkorstanje mpkorstanje force-pushed the fix/document-test-type-consistency-requirements branch from e4a181c to 492cbb5 Compare November 28, 2025 12:19
@mpkorstanje
Copy link
Contributor Author

Resolution after team discussion:

  • Don't require isContainer() as a precondition to calling AbstractTestDescriptor.addChild.
  • Document that only the hierarchy of the test descriptor is mutable after discovery.

@mpkorstanje mpkorstanje added this to the 6.1.0-M2 milestone Nov 28, 2025
@mpkorstanje mpkorstanje marked this pull request as ready for review November 28, 2025 13:26
@mpkorstanje mpkorstanje changed the title Document test and container are non-exclusive properties Clarify test descriptor implementation requirements Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify if TEST descriptors are allowed to have children

2 participants