Exemplo n.º 1
0
        public void CurrentTypedShouldReturnCurrent()
        {
            enumerator.Current = new Dummy();

            var actual = new RewriteDbQueryEnumerator <Dummy>(enumerator).Current;

            Assert.Equal(enumerator.Current, actual);
        }
Exemplo n.º 2
0
        public void DisposeShouldDispose()
        {
            using (var subject = new RewriteDbQueryEnumerator <Dummy>(enumerator))
            {
                subject.Dispose();

                Assert.True(enumerator.DisposeCalled);
            }
        }
Exemplo n.º 3
0
        public async Task MoveNextShouldMoveNext()
        {
            using (var subject = new RewriteDbQueryEnumerator <Dummy>(enumerator))
            {
                _ = await subject.MoveNextAsync(CancellationToken.None);

                Assert.True(enumerator.MoveNextCalled);
            }
        }
Exemplo n.º 4
0
        public void CurrentTypedShouldReturnCurrent()
        {
            enumerator.Current = new Dummy();

            using (var subject = new RewriteDbQueryEnumerator <Dummy>(enumerator))
            {
                var actual = subject.Current;

                Assert.Equal(enumerator.Current, actual);
            }
        }
Exemplo n.º 5
0
        public void CurrentUntypedShouldReturnCurrent()
        {
            enumerator.Current = new Dummy();

            using (var subject = new RewriteDbQueryEnumerator <Dummy>(enumerator))
            {
                var actual = ((IDbAsyncEnumerator)subject).Current;

                Assert.Equal(enumerator.Current, (Dummy)actual);
            }
        }