Skip to content

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

Merged
smitpatel merged 1 commit into
masterfrom
smit/refactor3
May 15, 2020
Merged

smitpatel merged 1 commit into
masterfrom
smit/refactor3

Conversation

@smitpatel

Copy link
Copy Markdown
Contributor

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
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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 requested a review from a team May 15, 2020 00:42
@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