Files
Check/MagicCarpetProject/MagicCarpetTests/StoragesContractsTests/BaseStorageContractTest.cs

31 lines
796 B
C#

using MagicCarpetTests.Infrastructure;
using MagicCarpetDatabase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MagicCarpetTests.StoragesContractsTests;
internal abstract class BaseStorageContractTest
{
protected MagicCarpetDbContext MagicCarpetDbContext { get; private set; }
[OneTimeSetUp]
public void OneTimeSetUp()
{
MagicCarpetDbContext = new MagicCarpetDbContext(new ConfigurationDatabaseTest());
MagicCarpetDbContext.Database.EnsureDeleted();
MagicCarpetDbContext.Database.EnsureCreated();
}
[OneTimeTearDown]
public void OneTimeTearDown()
{
MagicCarpetDbContext.Database.EnsureDeleted();
MagicCarpetDbContext.Dispose();
}
}