Skip to content

Commit

Permalink
Test for #8864
Browse files Browse the repository at this point in the history
Resolves #8864
  • Loading branch information
AndriySvyryd committed Aug 12, 2019
1 parent 87aaf63 commit a1abf86
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ FROM root c
WHERE ((c[""Discriminator""] = ""Customer"") AND (c[""City""] = ""London""))");
}

[ConditionalTheory(Skip = "Issue #16143")]
public override void Select_nested_projection()
{
base.Select_nested_projection();
}

public override async Task Select_nested_collection(bool isAsync)
{
await base.Select_nested_collection(isAsync);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,32 @@ from c in cs
select c.City);
}

[ConditionalFact]
public virtual void Select_nested_projection()
{
using (var context = CreateContext())
{
var customers = context.Customers
.Where(c => c.CustomerID.StartsWith("A"))
.Select(c => new
{
Customer = c,
CustomerAgain = Get(context, c.CustomerID)
})
.ToList();

Assert.Equal(4, customers.Count);

foreach (var customer in customers)
{
Assert.Same(customer.Customer, customer.CustomerAgain);
}
}
}

private static Customer Get(NorthwindContext context, string id)
=> context.Customers.Single(c => c.CustomerID == id);

[ConditionalTheory(Skip = "Issue#16314")]
[MemberData(nameof(IsAsyncData))]
public virtual Task Select_nested_collection(bool isAsync)
Expand Down

0 comments on commit a1abf86

Please sign in to comment.