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

Add regression test for issue#6061 #17593

Merged
merged 1 commit into from
Sep 3, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -4092,6 +4092,12 @@ public override Task SelectMany_correlated_with_outer_4(bool isAsync)
return base.SelectMany_correlated_with_outer_4(isAsync);
}

[ConditionalTheory(Skip = "Issue#17246")]
public override Task FirstOrDefault_over_empty_collection_of_value_type_returns_correct_results(bool isAsync)
{
return base.FirstOrDefault_over_empty_collection_of_value_type_returns_correct_results(isAsync);
}

[ConditionalTheory(Skip = "Issue #17246")]
public override Task All_client(bool isAsync) => null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ public override void Client_code_using_instance_in_anonymous_type()
[ConditionalTheory(Skip = "Issue #16963")]
public override Task SelectMany_correlated_with_outer_4(bool isAsync) => null;

[ConditionalTheory(Skip = "Issue #16963")]
public override Task FirstOrDefault_over_empty_collection_of_value_type_returns_correct_results(bool isAsync) => null;

[ConditionalTheory(Skip = "Issue #16963")]
public override Task All_client(bool isAsync) => null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1206,5 +1206,16 @@ from o in os.Where(o => c.CustomerID == o.CustomerID)
select new { c, o },
entryCount: 268);
}

[ConditionalTheory] //Issue#6061
smitpatel marked this conversation as resolved.
Show resolved Hide resolved
[MemberData(nameof(IsAsyncData))]
public virtual Task FirstOrDefault_over_empty_collection_of_value_type_returns_correct_results(bool isAsync)
{
return AssertQuery<Customer>(
isAsync,
cs => from c in cs
where c.CustomerID.Equals("FISSA")
select new { c.CustomerID, OrderId = c.Orders.OrderBy(o => o.OrderID).Select(o => o.OrderID).FirstOrDefault() });
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1007,5 +1007,19 @@ FROM [Orders] AS [o]
ORDER BY [c].[City], [o].[OrderID]
) AS [t]");
}

public override async Task FirstOrDefault_over_empty_collection_of_value_type_returns_correct_results(bool isAsync)
{
await base.FirstOrDefault_over_empty_collection_of_value_type_returns_correct_results(isAsync);

AssertSql(
@"SELECT [c].[CustomerID], (
SELECT TOP(1) [o].[OrderID]
FROM [Orders] AS [o]
WHERE ([c].[CustomerID] = [o].[CustomerID]) AND [o].[CustomerID] IS NOT NULL
ORDER BY [o].[OrderID]) AS [OrderId]
FROM [Customers] AS [c]
WHERE [c].[CustomerID] = N'FISSA'");
}
}
}