public void Dispose_ResetsValueToDefault()
        {
            IDisposableSource<string> disposableSource = new DisposableSource<string>(source);

            disposableSource.Dispose();

            Assert.Null(source.Value);
        }
예제 #2
0
        public void Dispose_ResetsValueToDefault()
        {
            IDisposableSource <string> disposableSource = new DisposableSource <string>(source);

            disposableSource.Dispose();

            Assert.Null(source.Value);
        }
예제 #3
0
        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);
        }