-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Milestone
Description
Overview
This issue is both a bug report and an enhancement proposal.
Bug
When the @MethodSource factory methods involved are overloaded, a local qualified method name (LQMN) is not treated the same as a fully-qualified method name (FQMN).
Specifically, if the user provides a FQMN without specifying the parameter list, JUnit Jupiter will find the factory method that accepts zero arguments. Whereas, if the user provides an LQMN without specifying the parameter list, JUnit Jupiter will fail to find the factory method.
@MethodSource("org.example.MyClass#factoryMethod()") // works
@MethodSource("org.example.MyClass#factoryMethod") // works
@MethodSource("factoryMethod()") // works
@MethodSource("factoryMethod") // does NOT workEnhancement
When a user provides a FQMN or LQMN without specifying the parameter list, JUnit Jupiter should fall back to the same lenient search semantics that are used to locate a "default" local factory method.
Related Issues
- Parameters are not validated in local
@MethodSourcefactory method #3130 - Syntax for local
@MethodSourcefactory method does not support canonical array names #3131
Deliverables
- Fix bug
- Implement enhancement
- Update Javadoc
- Update Release Notes
- Backport to
5.9.x