You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
873 B
C#
29 lines
873 B
C#
using System.Data.Common;
|
|
using EntityFrameworkCore.Jet.Data;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace EntityFrameworkCore.Jet.IntegrationTests
|
|
{
|
|
[TestClass]
|
|
public class AssemblyInitialization
|
|
{
|
|
public static DbConnection Connection;
|
|
|
|
[AssemblyInitialize]
|
|
public static void AssemblyInitialize(TestContext testContext)
|
|
{
|
|
// This is the only reason why we include the Provider
|
|
JetConfiguration.ShowSqlStatements = true;
|
|
JetConfiguration.UseConnectionPooling = false;
|
|
|
|
Connection = Helpers.CreateAndOpenJetDatabase(Helpers.DefaultJetStoreName);
|
|
}
|
|
|
|
[AssemblyCleanup]
|
|
public static void AssemblyCleanup()
|
|
{
|
|
Connection?.Dispose();
|
|
Helpers.DeleteJetDatabase(Helpers.DefaultJetStoreName);
|
|
}
|
|
}
|
|
} |