You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUnit0001 rejects MethodDataSource Arguments that omit optional parameters #7418
TUnit0001 rejects a MethodDataSource call that omits an optional data-method parameter. Execution supports optional defaults, but reflection overload selection also needs the separate fix in #7331 (open PR #7421). Users must suppress the analyzer even for supported calls; analyzer validation should agree with the execution overload rules.
Build with the analyzer enabled. TestDataAnalyzer selects methods by exact argument count (or by removing CancellationToken), without accounting for optional parameters.
Expected and actual
Expected: accept the omitted optional parameter and select the same overload as execution. Actual: TUnit0001 requires the missing argument. Add coverage for overloaded methods and defaults on overrides as well.
Environment
Observed in TUnit main at ca4437c and the existing optional-argument parity tests, which suppress TUnit0001. Runtime fix tracked by #7331; this issue covers analyzer validation separately.
Acceptance criteria
TUnit0001 accepts omitted optional data-method parameters and still rejects omitted required parameters.
Cover overloaded data methods, inherited override defaults, and injected CancellationToken parameters without changing existing exact-match precedence.
Activity
Fix null optional overload ranking for #7418
Align optional analyzer overload candidates with invocation for #7418
Match optional specificity and explicit defaults for #7418
Exclude inaccessible hiding declarations for #7418
Fix optional MethodDataSource argument validation (#7418)
Fix null optional overload ranking for #7418
Align optional analyzer overload candidates with invocation for #7418
Match optional specificity and explicit defaults for #7418
Exclude inaccessible hiding declarations for #7418
Accept omitted optional MethodDataSource arguments in TUnit0001 (#7486)