protected virtual void Dispose(bool disposing) { if (!_disposedValue) { _sut?.Dispose(); _dataTable?.Dispose(); _disposedValue = true; } }
public void DisposeCallsDisposeOnDataTable() { // Arrange var dataTableDisposeCalled = false; SetupSut(); _dataTable.Disposed += (s, e) => dataTableDisposeCalled = true; // Act _sut.Dispose(); // Assert Assert.True(dataTableDisposeCalled); }