Skip to content

Commit 5296f08

Browse files
committed
Made test simpler as .NET 7 alters created SQL
1 parent 93906a1 commit 5296f08

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

Test/UnitTests/TestDataLayer/TestOptionsWithLogTo.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -226,21 +226,9 @@ public void TestCreateUniqueClassOptionsWithLogTo()
226226
var book = context.Books.Where(x => x.Reviews.Count() > 1).Select(x => x.BookId).First();
227227

228228
//VERIFY
229+
_output.WriteLine(logs.Last());
229230
var lines = logs.Last().Split('\n').Select(x => x.Trim()).ToArray();
230231
lines[1].ShouldEqual("SELECT TOP(1) [b].[BookId]");
231-
lines[2].ShouldEqual("FROM [Books] AS [b]");
232-
#if NET7_0
233-
lines[3].ShouldEqual("WHERE [b].[SoftDeleted] = CAST(0 AS bit) AND (");
234-
lines[6].ShouldEqual("WHERE [b].[BookId] = [r].[BookId]) > 1");
235-
#elif NET6_0
236-
lines[3].ShouldEqual("WHERE ([b].[SoftDeleted] = CAST(0 AS bit)) AND ((");
237-
lines[6].ShouldEqual("WHERE [b].[BookId] = [r].[BookId]) > 1)");
238-
#elif NETCOREAPP3_1
239-
lines[3].ShouldEqual("WHERE ([b].[SoftDeleted] <> CAST(1 AS bit)) AND ((");
240-
lines[6].ShouldEqual("WHERE [b].[BookId] = [r].[BookId]) > 1)");
241-
#endif
242-
lines[4].ShouldEqual("SELECT COUNT(*)");
243-
lines[5].ShouldEqual("FROM [Review] AS [r]");
244232
}
245233

246234
[Fact]

0 commit comments

Comments
 (0)