public void QueryDocumentsManySizes()
        {
            var count = readTransaction.Stream <BigObject>("select * from dbo.BigObject").Count();

            if (count != 1000)
            {
                throw new Exception($"Didn't get 1000 items! Got {count} instead?!");
            }
        }
Exemplo n.º 2
0
        public List <Post> List100Posts()
        {
            var results = transaction.Stream <Post>("select Top 100 * from Posts").ToList();

            if (results.Count != 100)
            {
                throw new Exception("Incorrect results");
            }

            return(results);
        }
Exemplo n.º 3
0
 public QueryBuilderStateFixture()
 {
     transaction = Substitute.For <IReadTransaction>();
     transaction.ExecuteScalar <int>(Arg.Do <string>(q => executedQueries.Add(q)), Arg.Any <CommandParameterValues>());
     // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
     transaction.Stream <object>(Arg.Do <string>(q => executedQueries.Add(q)), Arg.Any <CommandParameterValues>());
 }