Skip to content

Commit

Permalink
Fix to #27229 - Test: Convert query tests to conditional theory
Browse files Browse the repository at this point in the history
Converting Northwind query tests to query infra.

Fixes #27229
  • Loading branch information
maumar committed Jan 25, 2022
1 parent 9e8ec9f commit daa232f
Show file tree
Hide file tree
Showing 24 changed files with 1,098 additions and 1,281 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,38 +41,33 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""City""] = ""London""))");
}

public override void KeylessEntity_by_database_view()
public override async Task KeylessEntity_by_database_view(bool async)
{
// Views are not supported.
Assert.Equal(
"0",
Assert.Throws<EqualException>(
() => base.KeylessEntity_by_database_view()).Actual);
(await Assert.ThrowsAsync<EqualException>(
() => base.KeylessEntity_by_database_view(async))).Actual);

AssertSql(
@"SELECT c
FROM root c
WHERE (c[""Discriminator""] = ""ProductView"")");
}

public override void Entity_mapped_to_view_on_right_side_of_join()
public override async Task Entity_mapped_to_view_on_right_side_of_join(bool async)
{
AssertTranslationFailed(
() =>
{
base.Entity_mapped_to_view_on_right_side_of_join();
return Task.CompletedTask;
});
await AssertTranslationFailed(() => base.Entity_mapped_to_view_on_right_side_of_join(async));

AssertSql();
}

public override void KeylessEntity_with_nav_defining_query()
public override async Task KeylessEntity_with_nav_defining_query(bool async)
{
Assert.Equal(
"0",
Assert.Throws<EqualException>(
() => base.KeylessEntity_with_nav_defining_query()).Actual);
(await Assert.ThrowsAsync <EqualException>(
() => base.KeylessEntity_with_nav_defining_query(async))).Actual);

AssertSql(
@"SELECT c
Expand Down Expand Up @@ -154,9 +149,9 @@ public override async Task Collection_correlated_with_keyless_entity_in_predicat
AssertSql();
}

public override void Auto_initialized_view_set()
public override async Task Auto_initialized_view_set(bool async)
{
base.Auto_initialized_view_set();
await base.Auto_initialized_view_set(async);

AssertSql(
@"SELECT c
Expand Down
Loading

0 comments on commit daa232f

Please sign in to comment.