Skip to content
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

Tests : A better infrastructure for asserting includes in the query #20958

Merged
merged 1 commit into from
May 15, 2020

Conversation

smitpatel
Copy link
Member

Remove AssertIncludeQuery which is based on queryable
Introduce AssertInclude method over element which can be used anywhere element asserter can be passed just like collection asserter

Resolves #15368

@smitpatel smitpatel requested a review from maumar May 14, 2020 20:07
@@ -3971,7 +3900,7 @@ public virtual Task Multiple_SelectMany_navigation_property_followed_by_select_c
[MemberData(nameof(IsAsyncData))]
public virtual Task SelectMany_navigation_property_with_include_and_followed_by_select_collection_navigation(bool async)
{
// can't use AssertIncludeQuery here, see #18191
// can't use AssertQuery here, see #18191
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore the comment, anyway this would be found via the linked bug number.

// issue #15368
//x => x.two,
AssertInclude(e.one, a.one, expectedIncludes);
AssertInclude(e.two, a.two, new ExpectedInclude<Level2>(l2 => l2.OneToOne_Optional_FK2));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maumar - Partial include solution.

Remove AssertIncludeQuery which is based on queryable
Introduce AssertInclude method over element which can be used anywhere element asserter can be passed just like collection asserter

Resolves #15368
@smitpatel smitpatel merged commit 7f81b60 into master May 15, 2020
@smitpatel smitpatel deleted the smit/refactor3 branch May 15, 2020 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QueryRewite/Test: improve AssertIncludeQuery to properly handle partial include matches
2 participants