Пример #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
 public void CleanUp()
 {
     if (context != null)
     {
         RemoveCharacterByName(context, testCharacterName);
         RemoveCharacterByName(context, testCharacterNameAfterChange);
         context.SaveChanges();
         context.Dispose();
     }
 }
Пример #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_context != null)
         {
             _context.Dispose();
             _context = null;
         }
     }
 }
 public void Dispose()
 {
     Db.Dispose();
 }
 public void AfterEachTest()
 {
     Context?.Dispose(); Connection?.Close();
 }