-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync EF Core to 7.0.0-preview.7.22359.1 (#2422)
- Loading branch information
Showing
12 changed files
with
250 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
test/EFCore.PG.FunctionalTests/EntitySplittingNpgsqlTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Npgsql.EntityFrameworkCore.PostgreSQL.TestUtilities; | ||
|
||
namespace Npgsql.EntityFrameworkCore.PostgreSQL; | ||
|
||
public class EntitySplittingNpgsqlTest : EntitySplittingTestBase | ||
{ | ||
public EntitySplittingNpgsqlTest(ITestOutputHelper testOutputHelper) | ||
: base(testOutputHelper) | ||
{ | ||
} | ||
|
||
protected override ITestStoreFactory TestStoreFactory | ||
=> NpgsqlTestStoreFactory.Instance; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
test/EFCore.PG.FunctionalTests/QueryExpressionInterceptionNpgsqlTestBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
using Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure; | ||
using Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal; | ||
using Npgsql.EntityFrameworkCore.PostgreSQL.TestUtilities; | ||
|
||
namespace Npgsql.EntityFrameworkCore.PostgreSQL; | ||
|
||
public abstract class QueryExpressionInterceptionNpgsqlTestBase : QueryExpressionInterceptionTestBase | ||
{ | ||
protected QueryExpressionInterceptionNpgsqlTestBase(InterceptionNpgsqlFixtureBase fixture) | ||
: base(fixture) | ||
{ | ||
} | ||
|
||
public abstract class InterceptionNpgsqlFixtureBase : InterceptionFixtureBase | ||
{ | ||
protected override ITestStoreFactory TestStoreFactory | ||
=> NpgsqlTestStoreFactory.Instance; | ||
|
||
protected override IServiceCollection InjectInterceptors( | ||
IServiceCollection serviceCollection, | ||
IEnumerable<IInterceptor> injectedInterceptors) | ||
=> base.InjectInterceptors(serviceCollection.AddEntityFrameworkNpgsql(), injectedInterceptors); | ||
|
||
public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) | ||
{ | ||
new NpgsqlDbContextOptionsBuilder(base.AddOptions(builder)) | ||
.ExecutionStrategy(d => new NpgsqlExecutionStrategy(d)); | ||
return builder; | ||
} | ||
} | ||
|
||
public class QueryExpressionInterceptionNpgsqlTest | ||
: QueryExpressionInterceptionNpgsqlTestBase, IClassFixture<QueryExpressionInterceptionNpgsqlTest.InterceptionNpgsqlFixture> | ||
{ | ||
public QueryExpressionInterceptionNpgsqlTest(InterceptionNpgsqlFixture fixture) | ||
: base(fixture) | ||
{ | ||
} | ||
|
||
public class InterceptionNpgsqlFixture : InterceptionNpgsqlFixtureBase | ||
{ | ||
protected override string StoreName | ||
=> "QueryExpressionInterception"; | ||
|
||
protected override bool ShouldSubscribeToDiagnosticListener | ||
=> false; | ||
} | ||
} | ||
|
||
public class QueryExpressionInterceptionWithDiagnosticsNpgsqlTest | ||
: QueryExpressionInterceptionNpgsqlTestBase, | ||
IClassFixture<QueryExpressionInterceptionWithDiagnosticsNpgsqlTest.InterceptionNpgsqlFixture> | ||
{ | ||
public QueryExpressionInterceptionWithDiagnosticsNpgsqlTest(InterceptionNpgsqlFixture fixture) | ||
: base(fixture) | ||
{ | ||
} | ||
|
||
public class InterceptionNpgsqlFixture : InterceptionNpgsqlFixtureBase | ||
{ | ||
protected override string StoreName | ||
=> "QueryExpressionInterceptionWithDiagnostics"; | ||
|
||
protected override bool ShouldSubscribeToDiagnosticListener | ||
=> true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.