public void TestConnection() { // Arrange var unitOfWork = new UnitOfWork(); // Act unitOfWork.Context<SampleContext>().Users.Any(); // Assert unitOfWork.Dispose(); }
public void FillDatabase() { // Arrange var unitOfWork = new UnitOfWork(); var context = unitOfWork.Context<SampleContext>(); if (context.Files.Any()) { throw new InvalidOperationException("Seems that thre are some data in database."); } (new DatabaseFill()).Fill(context); // Assert unitOfWork.Save(); }