public async Task ShouldSetKeysProperlyIfKeysNotNull()
            {
                var result =
                    new StatementResultCursor(() => Task.FromResult(new[] { "test" }),
                                              () => NextRecordFromEnum(new List <IRecord>().GetEnumerator()));
                var keys = await result.KeysAsync();

                keys.Should().HaveCount(1).And.Contain("test");
            }
Ejemplo n.º 2
0
            public async Task ShouldSetKeysProperlyIfKeysNotNull()
            {
                var stream = new Mock <IResultStream>();

                stream.Setup(x => x.NextRecordAsync()).Returns(NextRecordFromEnum(new List <IRecord>().GetEnumerator()));
                stream.Setup(x => x.GetKeysAsync()).Returns(() => Task.FromResult(new[] { "test" }));

                var result =
                    new StatementResultCursor(stream.Object);
                var keys = await result.KeysAsync();

                keys.Should().HaveCount(1).And.Contain("test");
            }