public DataModificationQueryBuilder(IRelationalStoreConfiguration configuration, Func <DocumentMap, string> keyAllocator) { this.mappings = configuration.DocumentMaps; this.serializer = configuration.DocumentSerializer; this.configuration = configuration; this.keyAllocator = keyAllocator; }
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); }); }