fix: pass empty array to params parameter when [Arguments] has no values - #4572
Conversation
When [Arguments] is used with no arguments and the test method has a params parameter, the parameter now correctly receives an empty array instead of null. This matches standard C# behavior where calling a method with params and no arguments passes an empty array. Fixes#4561 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
thomhurst
commented
Jan 27, 2026
SummaryFixes bug where Critical IssuesNone found ✅ AnalysisChanges Review:
This aligns with standard C# behavior where calling a method with a Test Coverage: TUnit Rules Compliance:
Correctness: Verdict✅ APPROVE - No critical issues |
Uh oh!
There was an error while loading. Please reload this page.
Summary
[Arguments]with no values passednullinstead of an empty array toparamsparametersArgumentsAttributeconstructor now distinguishes between empty arguments ([]) and explicit null ([null])Fixes#4561
Test plan
ParamsOnlyWithEmptyArgumentspasses with 4 test casesParamsArgumentsTestspass🤖 Generated with Claude Code