Overview
In #25966, we introduced support to validate that JUnit Jupiter test methods and lifecycle methods are not annotated with @Autowired
, and we explicitly filtered out private
methods since JUnit Jupiter has always claimed that private
test and lifecycle methods are not supported.
However, by accident, private
lifecycle methods are actually supported even if discouraged.
In light of that, we should update our validation check to include private
methods as well.
Related Issues
-
25966
- https://github.com/junit-team/junit5/issues/2914
- https://github.com/junit-team/junit5/issues/3242