-
-
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
Allow @Testable on fields #2168
Comments
It is already possible to meta-annotate fields with So, if an IDE doesn't find As for allowing @junit-team/junit-lambda, thoughts? |
Tentatively slated for 5.7 M1 for team discussion |
Team decision: Allow |
LGTM! 👍 |
Background
Currently, it's only possible to annotate classes and methods with
@Testable
to indicate that those are testable.In ArchUnit we have a custom engine to execute defined architecture rules as tests. The user has to annotate the elements with
@ArchTest
. The engine executes all rules that are annotated@ArchTest
, no matter if they are methods or fields.Example project: archunit-example/example-junit5
Example test class: CodingRulesTest
When I open the mentioned test class in my IDE, the IDE only recognizes the class itself and the one method as testable. The fields are not recognized as testable.
Suggestion
It should be possible to (meta)-annotate fields with
@Testable
. With this enhancement, IDEs have the chance to identify testable fields.The text was updated successfully, but these errors were encountered: