-
Notifications
You must be signed in to change notification settings - Fork 841
Fix Assert.Throws to validate parameter names #7007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances test quality and fixes encoding issues across AI-related test files. The changes add parameter name arguments to Assert.Throws calls for better test diagnostics and correct character encoding in test data.
Key changes:
- Added parameter name arguments to
Assert.Throwsassertions across multiple test files for clearer error messages - Fixed character encoding from
�to°for degree symbols in temperature strings - Updated
HostedFileContentconstructor to useThrow.IfNullOrWhitespacefor consistent validation
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| SummarizingChatReducerTests.cs | Added parameter names to exception assertions for constructor validation tests |
| MessageCountingChatReducerTests.cs | Added parameter names to exception assertions and fixed degree symbol encoding |
| ToolReductionTests.cs | Added parameter name to ArgumentOutOfRangeException assertion |
| NGramTests.cs | Added parameter names to multiple exception assertions |
| AIJsonUtilitiesTests.cs | Added parameter names to exception assertions for validation tests |
| AIJsonSchemaTransformCacheTests.cs | Added parameter names to exception assertions |
| HostedVectorStoreContentTests.cs | Added parameter names to exception assertions for constructor and property validation |
| HostedFileContentTests.cs | Added parameter names to exception assertions for constructor and property validation |
| HostedFileContent.cs | Updated constructor to use Throw.IfNullOrWhitespace for consistent validation |
Microsoft Reviewers: Open in CodeFlow