public void ActivateCategoryById()
 {
     try
     {
         var options = CreateNewContextOptions(); using (var db = new CategoryContext(options))
         {
             var repository = new CategoryRepository(db);
             var item       = GenerateModel();
             item.IsActive = false;
             Assert.DoesNotThrow(() => repository.Save(item));
             Assert.DoesNotThrow(() => item = repository.Activate(item.Id));
             Assert.DoesNotThrow(() => repository.Delete(item));
             Assert.IsTrue(item.IsActive);
         }
     }
     catch (Exception ex)
     {
         LogEventManager.Logger.Error(ex);
         throw;
     }
 }