-
Notifications
You must be signed in to change notification settings - Fork 253
Add tests for EF6 evaluators. #520
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
The PR adds new tests for the EF6 evaluators, especially to help diagnose and eventually fix issues such as non-parameterized LIKE queries and lack of support for multiple chains in EF6. Key changes include:
- Introducing a GetQueryString helper method in the IntegrationTest class to capture SQL logs.
- Adding test suites for Search, Order, Include, and AsNoTracking evaluators.
- Removing now-unused using directives in data model files.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/Ardalis.Specification.EntityFramework6.Tests/FixtureNew/IntegrationTest.cs | Added a helper method to log and filter SQL queries for tests. |
tests/Ardalis.Specification.EntityFramework6.Tests/FixtureNew/Data/Company.cs | Removed redundant using directive. |
tests/Ardalis.Specification.EntityFramework6.Tests/FixtureNew/Data/Address.cs | Removed redundant using directive. |
tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/SearchEvaluatorTests.cs | Added tests for search evaluator and noted issues via TODO comments. |
tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/OrderEvaluatorTests.cs | Added tests for order evaluator including chained ordering. |
tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/IncludeEvaluatorTests.cs | Added tests for include evaluator and commented-out tests for unsupported features. |
tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/AsNoTrackingEvaluatorTests.cs | Added tests for AsNoTracking evaluator verifying query modifications. |
I've never used the EF6 provider; it was a community contribution.
It turns out we have many bugs there. There is no support for multiple chains. The generated LIKE queries are not parameterized, etc. We'll have to improve the evaluators for EF6 significantly.