public DeleteQueryBuilder( IUniqueParameterNameGenerator uniqueParameterNameGenerator, DataModificationQueryBuilder queryBuilder, IWriteQueryExecutor queryExecutor, IEnumerable <IWhereClause> whereClauses = null, CommandParameterValues parameterValues = null) { this.uniqueParameterNameGenerator = uniqueParameterNameGenerator; this.queryBuilder = queryBuilder; this.queryExecutor = queryExecutor; this.whereClauses = whereClauses ?? new List <IWhereClause>(); this.parameterValues = parameterValues ?? new CommandParameterValues(); }
public DeleteQueryBuilderFixture() { query = null; parameters = null; mappings = Substitute.For <IDocumentMapRegistry>(); mappings.Resolve <object>().Returns(c => new EmptyMap()); mappings.Resolve(Arg.Any <Type>()).Returns(c => new EmptyMap()); queryExecutor = Substitute.For <IWriteQueryExecutor>(); queryExecutor.ExecuteNonQuery(Arg.Any <PreparedCommand>()).Returns(info => { query = info.Arg <PreparedCommand>().Statement; parameters = info.Arg <PreparedCommand>().ParameterValues; return(1); }); }