Skip to content

Navigation test refactoring initial work #35652

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

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
229 changes: 0 additions & 229 deletions test/EFCore.Cosmos.FunctionalTests/Query/JsonQueryCosmosTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ FROM root c
""");
});

public override async Task Basic_json_projection_owned_collection_branch(bool async)
{
// Always throws for sync.
if (async)
{
//issue #31696
await Assert.ThrowsAsync<NullReferenceException>(
() => base.Basic_json_projection_owned_collection_branch(async));
}
}

public override async Task Basic_json_projection_owned_collection_branch_NoTrackingWithIdentityResolution(bool async)
{
// Always throws for sync.
Expand All @@ -67,21 +56,6 @@ await Assert.ThrowsAsync<NullReferenceException>(
}
}

public override Task Basic_json_projection_owned_collection_root(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owned_collection_root(a);

// TODO: issue #34067 (?)
AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Basic_json_projection_owned_collection_root_NoTrackingWithIdentityResolution(bool async)
=> Fixture.NoSyncTest(
async, async a =>
Expand All @@ -94,20 +68,6 @@ public override Task Basic_json_projection_owned_collection_root_NoTrackingWithI
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Basic_json_projection_owned_reference_branch(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owned_reference_branch(async);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

Expand All @@ -122,36 +82,6 @@ public override Task Basic_json_projection_owned_reference_branch_NoTrackingWith
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Basic_json_projection_owned_reference_duplicated(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owned_reference_duplicated(async);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
ORDER BY c["Id"]
""");
});

public override Task Basic_json_projection_owned_reference_duplicated2(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owned_reference_duplicated2(async);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
ORDER BY c["Id"]
""");
});

Expand Down Expand Up @@ -196,21 +126,6 @@ public override Task Basic_json_projection_owned_reference_leaf(bool async)
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Basic_json_projection_owned_reference_root(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owned_reference_root(a);

// TODO: issue #34067 (?)
AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

Expand All @@ -226,48 +141,6 @@ public override Task Basic_json_projection_owned_reference_root_NoTrackingWithId
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Basic_json_projection_owner_entity(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owner_entity(a);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Basic_json_projection_owner_entity_duplicated(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owner_entity_duplicated(a);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Basic_json_projection_owner_entity_duplicated_NoTracking(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owner_entity_duplicated_NoTracking(a);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "SingleOwned")
""");
});

Expand All @@ -282,20 +155,6 @@ public override Task Basic_json_projection_owner_entity_duplicated_NoTrackingWit
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "SingleOwned")
""");
});

public override Task Basic_json_projection_owner_entity_NoTracking(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owner_entity_NoTracking(a);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

Expand All @@ -310,34 +169,6 @@ public override Task Basic_json_projection_owner_entity_NoTrackingWithIdentityRe
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Basic_json_projection_owner_entity_twice(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owner_entity_twice(a);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Basic_json_projection_owner_entity_twice_NoTracking(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Basic_json_projection_owner_entity_twice_NoTracking(a);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

Expand Down Expand Up @@ -1151,16 +982,6 @@ public override Task Json_collection_OrderByDescending_Skip_ElementAt(bool async
() => base.Json_collection_OrderByDescending_Skip_ElementAt(async),
CosmosStrings.LimitOffsetNotSupportedInSubqueries + Environment.NewLine + CosmosStrings.LimitOffsetNotSupportedInSubqueries);

[ConditionalTheory(Skip = "issue #34349")]
public override Task Json_collection_SelectMany(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Json_collection_SelectMany(a);

AssertSql("");
});

[ConditionalTheory(Skip = "issue #34335")]
public override Task Json_collection_Select_entity_collection_ElementAt(bool async)
=> base.Json_collection_Select_entity_collection_ElementAt(async);
Expand Down Expand Up @@ -1324,16 +1145,6 @@ public override Task Json_nested_collection_filter_in_projection(bool async)
=> AssertTranslationFailed(
() => base.Json_nested_collection_filter_in_projection(async));

[ConditionalTheory(Skip = "issue #34349")]
public override Task Json_nested_collection_SelectMany(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Json_nested_collection_SelectMany(a);

AssertSql("");
});

public override Task Json_predicate_on_bool_converted_to_int_zero_one(bool async)
=> Fixture.NoSyncTest(
async, async a =>
Expand Down Expand Up @@ -2098,30 +1909,6 @@ public override Task
async),
CosmosStrings.LimitOffsetNotSupportedInSubqueries);

[ConditionalTheory(Skip = "issue #34350")]
public override Task Json_projection_with_deduplication(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Json_projection_with_deduplication(a);

AssertSql("");
});

public override Task Json_projection_with_deduplication_reverse_order(bool async)
=> Fixture.NoSyncTest(
async, async a =>
{
await base.Json_projection_with_deduplication_reverse_order(async);

AssertSql(
"""
SELECT VALUE c
FROM root c
WHERE (c["Discriminator"] = "Basic")
""");
});

public override Task Json_property_in_predicate(bool async)
=> Fixture.NoSyncTest(
async, async a =>
Expand Down Expand Up @@ -2314,22 +2101,6 @@ FROM root c
""");
});

public override Task Project_json_entity_FirstOrDefault_subquery(bool async)
=> AssertTranslationFailed(
() => base.Project_json_entity_FirstOrDefault_subquery(async));

public override Task Project_json_entity_FirstOrDefault_subquery_deduplication(bool async)
=> AssertTranslationFailed(
() => base.Project_json_entity_FirstOrDefault_subquery_deduplication(async));

public override Task Project_json_entity_FirstOrDefault_subquery_deduplication_and_outer_reference(bool async)
=> AssertTranslationFailed(
() => base.Project_json_entity_FirstOrDefault_subquery_deduplication_and_outer_reference(async));

public override Task Project_json_entity_FirstOrDefault_subquery_deduplication_outer_reference_and_pruning(bool async)
=> AssertTranslationFailed(
() => base.Project_json_entity_FirstOrDefault_subquery_deduplication_outer_reference_and_pruning(async));

public override Task Project_json_entity_FirstOrDefault_subquery_with_binding_on_top(bool async)
=> AssertTranslationFailed(
() => base.Project_json_entity_FirstOrDefault_subquery_with_binding_on_top(async));
Expand Down
Loading