Skip to content

Commit

Permalink
Change Sql Assertions to account for difference of ordering between f…
Browse files Browse the repository at this point in the history
…ull framework and net core
  • Loading branch information
smitpatel committed Mar 24, 2017
1 parent e350ea9 commit d14632a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions test/EFCore.SqlServer.FunctionalTests/IncludeSqlServerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using Microsoft.EntityFrameworkCore.Specification.Tests;
using Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests.Utilities;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests
Expand Down Expand Up @@ -827,7 +828,7 @@ public override void Include_duplicate_collection_result_operator(bool useString

if (SupportsOffset)
{
AssertSql(
Assert.Contains(
@"@__p_1: 1
@__p_0: 2
Expand Down Expand Up @@ -864,9 +865,11 @@ ORDER BY [c2].[CustomerID]
OFFSET 2 ROWS FETCH NEXT 2 ROWS ONLY
) AS [t2]
) AS [t3] ON [c1.Orders].[CustomerID] = [t3].[CustomerID]
ORDER BY [t3].[CustomerID]
ORDER BY [t3].[CustomerID]",
Sql);

@__p_0: 2
Assert.Contains(
@"@__p_0: 2
SELECT [t7].[CustomerID]
FROM (
Expand All @@ -880,9 +883,11 @@ FROM [Customers] AS [c6]
ORDER BY [c6].[CustomerID]
OFFSET 2 ROWS FETCH NEXT 2 ROWS ONLY
) AS [t7]
ORDER BY [t6].[CustomerID]
ORDER BY [t6].[CustomerID]",
Sql);

SELECT [c2.Orders].[OrderID], [c2.Orders].[CustomerID], [c2.Orders].[EmployeeID], [c2.Orders].[OrderDate]
Assert.Contains(
@"SELECT [c2.Orders].[OrderID], [c2.Orders].[CustomerID], [c2.Orders].[EmployeeID], [c2.Orders].[OrderDate]
FROM [Orders] AS [c2.Orders]",
Sql);
}
Expand Down

0 comments on commit d14632a

Please sign in to comment.