From dac048dbbc9f950fb4cac8144e1b139637ba5b55 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Mon, 27 Apr 2026 08:49:45 +0200 Subject: [PATCH] Add missing test overrides for Contains_on_Enumerable/MemoryExtensions EF Core 9.0.14 added Contains_on_Enumerable and Contains_on_MemoryExtensions to PrimitiveCollectionsQueryTestBase. Add the required overrides with SQL assertions to PrimitiveCollectionsQueryNpgsqlTest. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../PrimitiveCollectionsQueryNpgsqlTest.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/EFCore.PG.FunctionalTests/Query/PrimitiveCollectionsQueryNpgsqlTest.cs b/test/EFCore.PG.FunctionalTests/Query/PrimitiveCollectionsQueryNpgsqlTest.cs index fff5a85fc..287528298 100644 --- a/test/EFCore.PG.FunctionalTests/Query/PrimitiveCollectionsQueryNpgsqlTest.cs +++ b/test/EFCore.PG.FunctionalTests/Query/PrimitiveCollectionsQueryNpgsqlTest.cs @@ -898,6 +898,30 @@ public override async Task Column_collection_of_bools_Contains(bool async) """); } + public override async Task Contains_on_Enumerable(bool async) + { + await base.Contains_on_Enumerable(async); + + AssertSql( + """ +SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."String", p."Strings" +FROM "PrimitiveCollectionsEntity" AS p +WHERE p."Int" IN (10, 999) +"""); + } + + public override async Task Contains_on_MemoryExtensions(bool async) + { + await base.Contains_on_MemoryExtensions(async); + + AssertSql( + """ +SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."String", p."Strings" +FROM "PrimitiveCollectionsEntity" AS p +WHERE p."Int" IN (10, 999) +"""); + } + public override async Task Column_collection_Count_method(bool async) { await base.Column_collection_Count_method(async);