Skip to content

Commit

Permalink
Fix mis-named string.Join translation test names (npgsql#3105)
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-jung committed Feb 24, 2024
1 parent ccfdc1f commit c63416e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 3 additions & 5 deletions test/EFCore.PG.FunctionalTests/Query/ArrayArrayQueryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,9 @@ public override async Task Array_IndexOf2(bool async)
}

// Note: see NorthwindFunctionsQueryNpgsqlTest.String_Join_non_aggregate for regular use without an array column/parameter
public override async Task String_Join_with_array_of_int_parameter(bool async)
public override async Task String_Join_with_array_of_int_column(bool async)
{
await base.String_Join_with_array_of_int_parameter(async);
await base.String_Join_with_array_of_int_column(async);

AssertSql(
"""
Expand All @@ -866,9 +866,7 @@ public override async Task String_Join_with_array_of_int_parameter(bool async)
""");
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public async Task String_Join_with_array_of_string_parameter(bool async)
public override async Task String_Join_with_array_of_string_column(bool async)
{
// This is not in ArrayQueryTest because string.Join uses another overload for string[] than for List<string> and thus
// ArrayToListReplacingExpressionVisitor won't work.
Expand Down
8 changes: 3 additions & 5 deletions test/EFCore.PG.FunctionalTests/Query/ArrayListQueryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,9 @@ public override async Task Array_IndexOf2(bool async)
}

// Note: see NorthwindFunctionsQueryNpgsqlTest.String_Join_non_aggregate for regular use without an array column/parameter
public override async Task String_Join_with_array_of_int_parameter(bool async)
public override async Task String_Join_with_array_of_int_column(bool async)
{
await base.String_Join_with_array_of_int_parameter(async);
await base.String_Join_with_array_of_int_column(async);

AssertSql(
"""
Expand All @@ -888,9 +888,7 @@ public override async Task String_Join_with_array_of_int_parameter(bool async)
""");
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public async Task String_Join_with_array_of_string_parameter(bool async)
public override async Task String_Join_with_array_of_string_column(bool async)
{
// This is not in ArrayQueryTest because string.Join uses another overload for string[] than for List<string> and thus
// ArrayToListReplacingExpressionVisitor won't work.
Expand Down
6 changes: 5 additions & 1 deletion test/EFCore.PG.FunctionalTests/Query/ArrayQueryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,16 @@ public virtual Task Concat(bool async)
// Note: see NorthwindFunctionsQueryNpgsqlTest.String_Join_non_aggregate for regular use without an array column/parameter
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task String_Join_with_array_of_int_parameter(bool async)
public virtual Task String_Join_with_array_of_int_column(bool async)
=> AssertQuery(
async,
ss => ss.Set<ArrayEntity>()
.Where(e => string.Join(", ", e.IntArray) == "3, 4"));

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public abstract Task String_Join_with_array_of_string_column(bool async);

#endregion Other translations

#region Support
Expand Down

0 comments on commit c63416e

Please sign in to comment.