public void RemoveVideo() { try { var options = CreateNewContextOptions(); using (var db = new AuctionContext(options)) { AuctionTestHelper.PopulateDefaultData(db); } using (var db = new AuctionContext(options)) { var repository = new AuctionRepository(db); var item = GenerateModel(); Assert.DoesNotThrow(() => repository.Save(item)); var video = new AuctionVideo { Title = "title", Description = "description", Video = GenerateAttachment(), AuctionId = item.Id }; Assert.DoesNotThrow(() => repository.AddVideo(item, video)); Assert.DoesNotThrow(() => repository.RemoveVideo(item, video)); } } catch (Exception ex) { LogEventManager.Logger.Error(ex); throw; } }