forked from slavaxom9k/PIBD-23_Fomichev_V.S._MagicCarpet
31 lines
791 B
C#
31 lines
791 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.StoragesContracts;
|
|
|
|
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();
|
|
}
|
|
}
|