Skip to content

Commit

Permalink
Fix to #24708 - Query/Test: convert remaining complex nav collection …
Browse files Browse the repository at this point in the history
…tests to AssertQuery

Also some minor test cleanup

Resolves #24708
  • Loading branch information
maumar committed Aug 25, 2021
1 parent 9453d15 commit 74f3ec5
Show file tree
Hide file tree
Showing 8 changed files with 664 additions and 613 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,68 +15,51 @@ protected ComplexNavigationsCollectionsSharedTypeQueryTestBase(TFixture fixture)
}

public override Task Multiple_complex_includes_self_ref(bool async)
{
return Task.CompletedTask;
}
=> Task.CompletedTask;

[ConditionalTheory(Skip = "issue #13560")]
public override Task Complex_SelectMany_with_nested_navigations_and_explicit_DefaultIfEmpty_with_other_query_operators_composed_on_top(bool async)
{
return base.Complex_SelectMany_with_nested_navigations_and_explicit_DefaultIfEmpty_with_other_query_operators_composed_on_top(async);
}
=> base.Complex_SelectMany_with_nested_navigations_and_explicit_DefaultIfEmpty_with_other_query_operators_composed_on_top(async);

[ConditionalTheory(Skip = "Issue#16752")]
// include after select is not supported
public override Task Include_collection_with_multiple_orderbys_complex(bool async)
{
return base.Include_collection_with_multiple_orderbys_complex(async);
}
=> Task.CompletedTask;

[ConditionalTheory(Skip = "Issue#16752")]
public override Task Include_collection_with_multiple_orderbys_complex_repeated(bool async)
{
return base.Include_collection_with_multiple_orderbys_complex_repeated(async);
}
=> Task.CompletedTask;

[ConditionalTheory(Skip = "Issue#16752")]
public override Task Include_collection_with_multiple_orderbys_complex_repeated_checked(bool async)
{
return base.Include_collection_with_multiple_orderbys_complex_repeated_checked(async);
}
=> Task.CompletedTask;

[ConditionalTheory(Skip = "Issue#16752")]
public override Task Include_collection_with_multiple_orderbys_member(bool async)
{
return base.Include_collection_with_multiple_orderbys_member(async);
}
=> Task.CompletedTask;

[ConditionalTheory(Skip = "Issue#16752")]
public override Task Include_collection_with_multiple_orderbys_methodcall(bool async)
{
return base.Include_collection_with_multiple_orderbys_methodcall(async);
}
=> Task.CompletedTask;

[ConditionalTheory(Skip = "Issue#16752")]
public override Task Include_collection_with_multiple_orderbys_property(bool async)
{
return base.Include_collection_with_multiple_orderbys_property(async);
}
=> Task.CompletedTask;

[ConditionalTheory(Skip = "Issue#16752")]
public override Task Include_inside_subquery(bool async)
{
return base.Include_inside_subquery(async);
}
=> Task.CompletedTask;

[ConditionalTheory(Skip = "Issue#16752")]
public override Task Filtered_include_outer_parameter_used_inside_filter(bool async)
{
return base.Filtered_include_outer_parameter_used_inside_filter(async);
}
=> Task.CompletedTask;

public override Task Include_after_multiple_SelectMany_and_reference_navigation(bool async)
=> Task.CompletedTask;

public override Task Include_after_SelectMany_and_multiple_reference_navigations(bool async)
=> Task.CompletedTask;

public override Task Required_navigation_with_Include(bool async)
=> Task.CompletedTask;

public override Task Required_navigation_with_Include_ThenInclude(bool async)
=> Task.CompletedTask;

// Navigations used are not mapped in shared type.
public override Task SelectMany_DefaultIfEmpty_multiple_times_with_joins_projecting_a_collection(bool async)
{
// Navigations used are not mapped in shared type.
return Task.CompletedTask;
}
=> Task.CompletedTask;
}
}
40 changes: 0 additions & 40 deletions test/EFCore.Specification.Tests/Query/GearsOfWarQueryTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5842,46 +5842,6 @@ public virtual Task GroupBy_Property_Include_Aggregate_with_anonymous_selector(b
assertOrder: true);
}

[ConditionalTheory(Skip = "issue #16752")]
[MemberData(nameof(IsAsyncData))]
public virtual Task Group_by_entity_key_with_include_on_that_entity_with_key_in_result_selector(bool async)
{
return AssertQuery(
async,
ss => ss.Set<Gear>()
.GroupBy(g => g.CityOfBirth)
.OrderBy(g => g.Key.Name)
.Select(g => g.Key)
.Include(c => c.BornGears).ThenInclude(g => g.Weapons),
assertOrder: true,
elementAsserter: (e, a) =>
{
Assert.Equal(e.Name, a.Name);
Assert.Equal(e.BornGears == null, a.BornGears == null);
Assert.Equal(e.BornGears.Count(), a.BornGears.Count());
});
}

[ConditionalTheory(Skip = "issue #16752")]
[MemberData(nameof(IsAsyncData))]
public virtual Task Group_by_entity_key_with_include_on_that_entity_with_key_in_result_selector_using_EF_Property(bool async)
{
return AssertQuery(
async,
ss => ss.Set<Gear>()
.GroupBy(g => g.CityOfBirth)
.OrderBy(g => g.Key.Name)
.Select(g => EF.Property<City>(g, "Key"))
.Include(c => c.BornGears).ThenInclude(g => g.Weapons),
assertOrder: true,
elementAsserter: (e, a) =>
{
Assert.Equal(e.Name, a.Name);
Assert.Equal(e.BornGears == null, a.BornGears == null);
Assert.Equal(e.BornGears.Count(), a.BornGears.Count());
});
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Group_by_with_include_with_entity_in_result_selector(bool async)
Expand Down
Loading

0 comments on commit 74f3ec5

Please sign in to comment.