Repository: dotnet/efcore
File: test/EFCore.SqlServer.FunctionalTests/Query/PrimitiveCollectionsQueryOldSqlServerTest.cs (C#)

Code before:
""",
            //
            """
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].[NullableWrappedId], [p].[NullableWrappedIdWithNullableComparer], [p].[String], [p].[Strings], [p].[WrappedId]
FROM [PrimitiveCollectionsEntity] AS [p]
WHERE [p].[Int] NOT IN (10, 999)
""");
    }

    public override Task Column_collection_of_ints_Contains()
        => AssertCompatibilityLevelTooLow(() => base.Column_collection_of_ints_Contains());

    public override Task Column_collection_of_nullable_ints_Contains()
        => AssertCompatibilityLevelTooLow(() => base.Column_collection_of_nullable_ints_Contains());

    public override Task Column_collection_of_nullable_ints_Contains_null()
        => AssertCompatibilityLevelTooLow(() => base.Column_collection_of_nullable_ints_Contains_null());

    public override Task Column_collection_of_strings_contains_null()
        => AssertTranslationFailed(() => base.Column_collection_of_strings_contains_null());

    public override Task Column_collection_of_nullable_strings_contains_null()
        => AssertTranslationFailed(() => base.Column_collection_of_strings_contains_null());

    public override Task Column_collection_of_bools_Contains()
        => AssertCompatibilityLevelTooLow(() => base.Column_collection_of_bools_Contains());

    [ConditionalFact]
    public virtual async Task Json_representation_of_bool_array()
    {
        await using var context = CreateContext();

        Assert.Equal(
            "[true,false]",
            await context.Database.SqlQuery<string>($"SELECT [Bools] AS [Value] FROM [PrimitiveCollectionsEntity] WHERE [Id] = 1")
                .SingleAsync());
    }

    public override async Task Contains_on_Enumerable()
    {
        await base.Contains_on_Enumerable();

        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].[NullableWrappedId], [p].[NullableWrappedIdWithNullableComparer], [p].[String], [p].[Strings], [p].[WrappedId]
FROM [PrimitiveCollectionsEntity] AS [p]
WHERE [p].[Int] IN (10, 999)
""");
    }



Review comment (bug):
`Column_collection_of_nullable_strings_contains_null` is currently asserting translation failure for `base.Column_collection_of_strings_Contains_null()`, which duplicates the non-nullable strings null test and leaves the nullable-strings scenario untested. This should call `base.Column_collection_of_nullable_strings_contains_null()` instead so the override matches the method name/intent.
```suggestion
        => AssertTranslationFailed(() => base.Column_collection_of_nullable_strings_contains_null());
```

Code after:
""",
            //
            """
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].[NullableWrappedId], [p].[NullableWrappedIdWithNullableComparer], [p].[String], [p].[Strings], [p].[WrappedId]
FROM [PrimitiveCollectionsEntity] AS [p]
WHERE [p].[Int] NOT IN (10, 999)
""");
    }

    public override Task Column_collection_of_ints_Contains()
        => AssertCompatibilityLevelTooLow(() => base.Column_collection_of_ints_Contains());

    public override Task Column_collection_of_nullable_ints_Contains()
        => AssertCompatibilityLevelTooLow(() => base.Column_collection_of_nullable_ints_Contains());

    public override Task Column_collection_of_nullable_ints_Contains_null()
        => AssertCompatibilityLevelTooLow(() => base.Column_collection_of_nullable_ints_Contains_null());

    public override Task Column_collection_of_strings_Contains()
        => AssertTranslationFailed(() => base.Column_collection_of_strings_Contains());

    public override Task Column_collection_of_strings_Contains_null()
        => AssertTranslationFailed(() => base.Column_collection_of_strings_Contains_null());

    public override Task Column_collection_of_nullable_strings_contains_null()
        => AssertTranslationFailed(() => base.Column_collection_of_strings_Contains_null());

    public override Task Column_collection_of_bools_Contains()
        => AssertCompatibilityLevelTooLow(() => base.Column_collection_of_bools_Contains());

    [ConditionalFact]
    public virtual async Task Json_representation_of_bool_array()
    {
        await using var context = CreateContext();

        Assert.Equal(
            "[true,false]",
            await context.Database.SqlQuery<string>($"SELECT [Bools] AS [Value] FROM [PrimitiveCollectionsEntity] WHERE [Id] = 1")
                .SingleAsync());
    }

    public override async Task Contains_on_Enumerable()
    {
        await base.Contains_on_Enumerable();

        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].[NullableWrappedId], [p].[NullableWrappedIdWithNullableComparer], [p].[String], [p].[Strings], [p].[WrappedId]
FROM [PrimitiveCollectionsEntity] AS [p]
WHERE [p].[Int] IN (10, 999)
""");