-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Navigation test refactoring initial work #35652
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.
Copilot reviewed 59 out of 59 changed files in this pull request and generated 2 comments.
test/EFCore.Specification.Tests/Query/Relationships/ComplexRelationshipsQueryFixtureBase.cs
Show resolved
Hide resolved
test/EFCore.Specification.Tests/Query/Relationships/ComplexRelationshipsQueryFixtureBase.cs
Outdated
Show resolved
Hide resolved
621497e
to
8d1a4d6
Compare
64b65bd
to
f42c629
Compare
Are you planning to replace the commented-out tests in this PR or a separate one? |
@AndriySvyryd this PR, I will add some more tests and do the clean-up of the commented ones. But you can take a look at the model and the test class structure. |
16601a6
to
fac79bf
Compare
We want to be able to re-use existing navigation tests (currently spread around multiple test classes - complex navs, gears of war, northwind, json) for the upcoming optional complex types, complex collections and json-mapped complex types (all highly requested features in EF). We also want to be able to increase coverage for existing features, e.g. we have very good coverage of navigations in json test suite, but it's not used for regular or owned entities. This work can also be used by provider writers (e.g. Mongo) to boost their coverage. Navigation test refactoring: - using common model for entity, owned, json and complex type navigations - 4 levels: root, trunk, branch, leaf - optional reference, required reference (dependent to principal), collection - for now just testing projection scenarios as proof of concept (tracking / notracking) TODO: - fix owned sqlite model, - add model with inheritance, - move actual tests from existing test suites (ongoing), - add migration check (that model can be migrated to from scratch and that noop is actual noop), - implement InMemory tests. - added include stub - added cosmos tests
fac79bf
to
e1cc089
Compare
|
||
[ConditionalTheory] | ||
[MemberData(nameof(IsAsyncData))] | ||
public virtual Task Include_trunk_collection(bool async) |
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.
@maumar remember that as discussed, I think we want to keep tests which rely on collection relationships separate from those which only rely on reference relationships - this is because we have non-JSON complex/owned mapping (table splitting), which will only be supported with reference relationships.
Motivation:
We want to be able to re-use existing navigation tests (currently spread around multiple test classes - complex navs, gears of war, northwind, json)
for the upcoming optional complex types, complex collections and json-mapped complex types (all highly requested features in EF).
We also want to be able to increase coverage for existing features, e.g. we have very good coverage of navigations in json test suite, but it's not used for regular or owned entities.
This work can also be used by provider writers (e.g. Mongo) to boost their coverage.
Details:
TODO: