File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1515
1616import org .junit .platform .commons .util .Preconditions ;
1717import org .junit .platform .engine .DiscoverySelector ;
18+ import org .junit .platform .engine .discovery .MethodSelector ;
1819
1920/**
21+ * Jupiter-specific selector for methods, potentially in nested classes.
22+ *
23+ * <p>The important difference to {@link MethodSelector} is that this selector's
24+ * {@link #equals(Object)} method takes into account the selected method's
25+ * {@linkplain Method#getDeclaringClass() declaring class} to support cases
26+ * where a package-private method is declared in a super class in a different
27+ * package and a method with the same signature is declared in a subclass. In
28+ * that case both methods should be discovered because the one declared in the
29+ * subclass does <em>not</em> override the one in the super class.
30+ *
2031 * @since 6.0.1
2132 */
2233record DeclaredMethodSelector (List <Class <?>> testClasses , Method method ) implements DiscoverySelector {
You can’t perform that action at this time.
0 commit comments