public void CurrentCalled_OnInnerEnumerator() { // Arrange var innerEnumerator = new Mock <IEnumerator <int> >(); innerEnumerator.SetupGet(innerEnum => innerEnum.Current) .Verifiable(); var delegatingEnumerator = new DelegatingEnumerator <int, int>( innerEnumerator.Object, wrapperProvider: null); // Act var obj = delegatingEnumerator.Current; // Assert innerEnumerator.Verify(); }
public void ResetCalled_OnInnerEnumerator() { // Arrange var innerEnumerator = new Mock <IEnumerator <int> >(); innerEnumerator.Setup(innerEnum => innerEnum.Reset()) .Verifiable(); var delegatingEnumerator = new DelegatingEnumerator <int, int>( innerEnumerator.Object, wrapperProvider: null); // Act delegatingEnumerator.Reset(); // Assert innerEnumerator.Verify(); }