public void Dispose_ResetsValueToDefault() { IDisposableSource<string> disposableSource = new DisposableSource<string>(source); disposableSource.Dispose(); Assert.Null(source.Value); }
public void Dispose_ResetsValueToDefault() { IDisposableSource <string> disposableSource = new DisposableSource <string>(source); disposableSource.Dispose(); Assert.Null(source.Value); }
public void Dispose_CallsAction() { bool called = false; IDisposableSource <string> disposableSource = new DisposableSource <string>(source, () => called = true); Assert.False(called); disposableSource.Dispose(); Assert.True(called); }
public void Dispose_CallsAction() { bool called = false; IDisposableSource<string> disposableSource = new DisposableSource<string>(source, () => called = true); Assert.False(called); disposableSource.Dispose(); Assert.True(called); }