VerifySingleResultSet() public static method

public static VerifySingleResultSet ( IEnumerable result ) : void
result IEnumerable
return void
Exemplo n.º 1
0
        public async Task AsEnumerableAsyncWithSelector_WhenCalledAndAwaited_ReturnsResultSet()
        {
            var command        = PrepareCommand();
            var commandBuilder = new CommandBuilder(command, DbConfig.Default);

            command.SetResultSet(Person.GetSingleResultSet());

            var result = (await commandBuilder.AsEnumerableAsync(d => (Person)Person.From(d))).ToList();

            Person.VerifySingleResultSet(result);
        }
Exemplo n.º 2
0
        public void AsEnumerableGeneric_WhenCalled_ReturnsResults()
        {
            var command = PrepareCommand();

            var commandBuilder = new CommandBuilder(command, DbConfig.Default);

            command.SetResultSet(Person.GetSingleResultSet());

            var result = commandBuilder.AsEnumerable <Person>().ToList();

            Person.VerifySingleResultSet(result);
        }
Exemplo n.º 3
0
        public void AsEnumerableWithSelector_WhenCalled_ReturnsResults()
        {
            var command = PrepareCommand();

            var commandBuilder = new CommandBuilder(command, DbConfig.Default);

            command.SetResultSet(Person.GetSingleResultSet());

            var result = commandBuilder.AsEnumerable(d => (Person)Person.From(d)).ToList();

            Person.VerifySingleResultSet(result);
        }
Exemplo n.º 4
0
        public async Task AsEnumerableAsyncForType_WhenCalledAndAwaited_ReturnsResultSet()
        {
            var command        = PrepareCommand();
            var commandBuilder = new CommandBuilder(command, DbConfig.Default);

            command.SetResultSet(Person.GetSingleResultSet());

            var result = new List <Person>();

            await foreach (var p in commandBuilder.AsEnumerableAsync <Person>())
            {
                result.Add(p);
            }

            Person.VerifySingleResultSet(result);
        }
Exemplo n.º 5
0
        public async Task AsEnumerableAsync_WhenCalledAndAwaited_ReturnsResultSet()
        {
            var command        = PrepareCommand();
            var commandBuilder = new CommandBuilder(command, DbConfig.Default);

            command.SetResultSet(Person.GetSingleResultSet());

            var list = new List <dynamic>();

            await foreach (var item in commandBuilder.AsEnumerableAsync())
            {
                list.Add(item);
            }

            Person.VerifySingleResultSet(list);
        }