Esempio n. 1
0
 public void TakeSet()
 {
     ShimSqlMapper.QueryOf1IDbConnectionStringObjectIDbTransactionBooleanNullableOfInt32NullableOfCommandType(
         (connection, sql, parameters, transaction, buffered, timeout, type) => new List <Post>());
     this.GetDashing().Query <Post>().Take(10).ToList();
     this.SqlWriter.Verify(s => s.WriteSqlFor <Post>(It.Is <Query <Post> >(q => q.QueryType == QueryType.Select && q.Take == 10)));
 }
Esempio n. 2
0
 public void WhereExpression()
 {
     ShimSqlMapper.QueryOf1IDbConnectionStringObjectIDbTransactionBooleanNullableOfInt32NullableOfCommandType(
         (connection, sql, parameters, transaction, buffered, timeout, type) => new List <Post>());
     this.GetDashing().Query <Post>().Where(p => p.PostId == 1).ToList();
     this.SqlWriter.Verify(
         s => s.WriteSqlFor <Post>(It.Is <Query <Post> >(q => q.QueryType == QueryType.Select && q.WhereClauses.Count == 1 && q.WhereClauses.First().IsExpression())));
 }