using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Model.UnitsOfWork;
namespace AppTests
{
[TestClass]
public class Test_DB
{
/// <summary>
/// Проверка установки соединения с базой
/// </summary>
[TestMethod]
public void TryConnect()
{
bool? exists;
using (Context context = new Context())
{
context.Database.CreateIfNotExists();
exists = context.Database.Exists();
}
Assert.IsTrue(exists.HasValue && exists.Value);
}
}
}