-
Notifications
You must be signed in to change notification settings - Fork 321
Tests | SqlError, SqlErrorCollection #3869
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
base: main
Are you sure you want to change the base?
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 reorganizes test files by moving SqlError and SqlErrorCollection tests from the FunctionalTests project to the UnitTests project, making them truly isolated unit tests that don't require a SQL Server connection.
- Migrates SqlError serialization test from FunctionalTests to UnitTests with improved test structure
- Adds comprehensive SqlErrorCollection unit tests covering collection operations, indexing, enumeration, and copy operations
- Removes dependency on SQL Server connection for these tests by using internal constructors directly
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlErrorTests.cs | New unit test file for SqlError with serialization round-trip test |
| src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlErrorCollectionTests.cs | New comprehensive unit test file for SqlErrorCollection with tests for Add, CopyTo, GetEnumerator, and Indexer operations |
| src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlErrorTest.cs | Removes old functional test file that required SQL Server connection |
| src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj | Removes reference to deleted SqlErrorTest.cs file |
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlErrorTests.cs
Outdated
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlErrorCollectionTests.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlErrorTests.cs
Show resolved
Hide resolved
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
...Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlErrorCollectionTests.cs
Outdated
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlErrorCollectionTests.cs
Outdated
Show resolved
Hide resolved
...Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlErrorCollectionTests.cs
Outdated
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #3869 +/- ##
==========================================
- Coverage 76.90% 69.98% -6.93%
==========================================
Files 269 263 -6
Lines 43246 66170 +22924
==========================================
+ Hits 33260 46308 +13048
- Misses 9986 19862 +9876
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Pulling together a few PRs from some test work I did over the holidays. This PR:
Issues
N/A
Testing
Tests run locally and seem to work in the draft runs I did previously