コード例 #1
0
        public void ShouldDisposeUnderlyingEnumerator()
        {
            var underlyingEnumerator     = new TestEnumerator();
            var valueInjectionEnumerator = new ValueInjectionEnumerator(underlyingEnumerator);

            valueInjectionEnumerator.Dispose();
            Assert.True(underlyingEnumerator.DisposeCalled);
        }
コード例 #2
0
        public void ShouldDelegateReset()
        {
            var underlyingEnumerator     = new TestEnumerator();
            var valueInjectionEnumerator = new ValueInjectionEnumerator(underlyingEnumerator);

            valueInjectionEnumerator.Reset();
            Assert.True(underlyingEnumerator.ResetCalled);
        }