From 8769ed6b9eec939853ef55f1478838486891a723 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Thu, 31 Oct 2019 14:23:03 +0100 Subject: [PATCH] Apply element sorter in AssertIncludeQuery --- .../TestUtilities/QueryAsserter.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/EFCore.Specification.Tests/TestUtilities/QueryAsserter.cs b/test/EFCore.Specification.Tests/TestUtilities/QueryAsserter.cs index 81331f35911..4f80d5ae693 100644 --- a/test/EFCore.Specification.Tests/TestUtilities/QueryAsserter.cs +++ b/test/EFCore.Specification.Tests/TestUtilities/QueryAsserter.cs @@ -243,6 +243,12 @@ public override async Task> AssertIncludeQuery( elementSorter = (Func)sorter; } + if (elementSorter != null) + { + actual = actual.OrderBy(elementSorter).ToList(); + expected = expected.OrderBy(elementSorter).ToList(); + } + if (clientProjections != null) { foreach (var clientProjection in clientProjections)