-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to using SQL Server instead of SQLite in the tests (#242)
More fully-featured, e.g. TPC creates a sequence by convention.
- Loading branch information
Showing
4 changed files
with
19 additions
and
15 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
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
16 changes: 8 additions & 8 deletions
16
...s.Test/TestUtilities/SqliteTestHelpers.cs → ...est/TestUtilities/SqlServerTestHelpers.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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
using Microsoft.Data.Sqlite; | ||
using Microsoft.Data.SqlClient; | ||
using Microsoft.EntityFrameworkCore.Diagnostics; | ||
using Microsoft.EntityFrameworkCore.Sqlite.Diagnostics.Internal; | ||
using Microsoft.EntityFrameworkCore.SqlServer.Diagnostics.Internal; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Microsoft.EntityFrameworkCore.TestUtilities; | ||
|
||
public class SqliteTestHelpers : TestHelpers | ||
public class SqlServerTestHelpers : TestHelpers | ||
{ | ||
protected SqliteTestHelpers() | ||
protected SqlServerTestHelpers() | ||
{ | ||
} | ||
|
||
public static SqliteTestHelpers Instance { get; } = new(); | ||
public static SqlServerTestHelpers Instance { get; } = new(); | ||
|
||
public override IServiceCollection AddProviderServices(IServiceCollection services) | ||
=> services.AddEntityFrameworkSqlite(); | ||
=> services.AddEntityFrameworkSqlServer(); | ||
|
||
public override DbContextOptionsBuilder UseProviderOptions(DbContextOptionsBuilder optionsBuilder) | ||
=> optionsBuilder.UseSqlite(new SqliteConnection("Data Source=:memory:")); | ||
=> optionsBuilder.UseSqlServer(new SqlConnection("Data Source=foo")); | ||
|
||
#pragma warning disable EF1001 | ||
public override LoggingDefinitions LoggingDefinitions { get; } = new SqliteLoggingDefinitions(); | ||
public override LoggingDefinitions LoggingDefinitions { get; } = new SqlServerLoggingDefinitions(); | ||
#pragma warning restore EF1001 | ||
} |