-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
QueryExpressionInterceptionSqliteTestBase.cs
52 lines (43 loc) · 2.1 KB
/
QueryExpressionInterceptionSqliteTestBase.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.EntityFrameworkCore;
#nullable disable
public abstract class QueryExpressionInterceptionSqliteTestBase : QueryExpressionInterceptionTestBase
{
protected QueryExpressionInterceptionSqliteTestBase(InterceptionSqliteFixtureBase fixture)
: base(fixture)
{
}
public abstract class InterceptionSqliteFixtureBase : InterceptionFixtureBase
{
protected override ITestStoreFactory TestStoreFactory
=> SqliteTestStoreFactory.Instance;
protected override IServiceCollection InjectInterceptors(
IServiceCollection serviceCollection,
IEnumerable<IInterceptor> injectedInterceptors)
=> base.InjectInterceptors(serviceCollection.AddEntityFrameworkSqlite(), injectedInterceptors);
}
public class QueryExpressionInterceptionSqliteTest(QueryExpressionInterceptionSqliteTest.InterceptionSqliteFixture fixture)
: QueryExpressionInterceptionSqliteTestBase(fixture), IClassFixture<QueryExpressionInterceptionSqliteTest.InterceptionSqliteFixture>
{
public class InterceptionSqliteFixture : InterceptionSqliteFixtureBase
{
protected override string StoreName
=> "QueryExpressionInterception";
protected override bool ShouldSubscribeToDiagnosticListener
=> false;
}
}
public class QueryExpressionInterceptionWithDiagnosticsSqliteTest(QueryExpressionInterceptionWithDiagnosticsSqliteTest.InterceptionSqliteFixture fixture)
: QueryExpressionInterceptionSqliteTestBase(fixture),
IClassFixture<QueryExpressionInterceptionWithDiagnosticsSqliteTest.InterceptionSqliteFixture>
{
public class InterceptionSqliteFixture : InterceptionSqliteFixtureBase
{
protected override string StoreName
=> "QueryExpressionInterceptionWithDiagnostics";
protected override bool ShouldSubscribeToDiagnosticListener
=> true;
}
}
}