Skip to content

Commit 2242b99

Browse files
committed
more json tests
1 parent 6cacf97 commit 2242b99

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System.Text.Json;
5+
6+
namespace Microsoft.EntityFrameworkCore.Query;
7+
8+
#nullable disable
9+
10+
public abstract class AdHocJsonQueryRelationalTestBase : AdHocJsonQueryTestBase
11+
{
12+
protected TestSqlLoggerFactory TestSqlLoggerFactory
13+
=> (TestSqlLoggerFactory)ListLoggerFactory;
14+
15+
protected virtual string JsonColumnType
16+
=> null;
17+
}

test/EFCore.Relational.Specification.Tests/Query/AdHocJsonQueryTestBase.cs renamed to test/EFCore.Specification.Tests/Query/AdHocJsonQueryTestBase.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ protected virtual async Task Seed32310(DbContext context)
4444
{
4545
var user = new Pub32310
4646
{
47-
Name = "FBI", Visits = new Visits32310 { LocationTag = "tag", DaysVisited = [new DateOnly(2023, 1, 1)] }
47+
Name = "FBI",
48+
Visits = new Visits32310 { LocationTag = "tag", DaysVisited = [new DateOnly(2023, 1, 1)] }
4849
};
4950

5051
context.Add(user);
@@ -1423,7 +1424,6 @@ public virtual async Task Not_ICollection_basic_projection(bool async)
14231424
var result = async
14241425
? await query.ToListAsync()
14251426
: query.ToList();
1426-
14271427
Assert.Equal(2, result.Count);
14281428
}
14291429
}
@@ -1467,9 +1467,9 @@ protected virtual void BuildModelNotICollection(ModelBuilder modelBuilder)
14671467

14681468
#endregion
14691469

1470-
protected TestSqlLoggerFactory TestSqlLoggerFactory
1471-
=> (TestSqlLoggerFactory)ListLoggerFactory;
1470+
//protected TestSqlLoggerFactory TestSqlLoggerFactory
1471+
// => (TestSqlLoggerFactory)ListLoggerFactory;
14721472

1473-
protected virtual string JsonColumnType
1474-
=> null;
1473+
//protected virtual string JsonColumnType
1474+
// => null;
14751475
}

0 commit comments

Comments
 (0)