Exemplo n.º 1
0
 public virtual string GetWhereSql(Filter filter, int parameterStartIndex)
 {
     var whereBuilder = new WhereBuilder(this, parameterStartIndex);
     return whereBuilder.Build(filter);
 }
        public void Init()
        {
            _dialect = new Mock<Dialect>();

            _dialect.Setup(p => p.WordWhere).Returns(_wordWhere);
            _dialect.Setup(p => p.GetParameterName(It.IsAny<int>()))
                    .Returns((int input) => ":par" + input);
            _dialect.Setup(p => p.WordNull).Returns("null");

            _whereBuilder = new WhereBuilder(_dialect.Object, 0);

            _filter1 = CreateFilter(1);
            _filter2 = CreateFilter(2);
            _filter3 = CreateFilter(3);
            _filter4 = CreateFilter(4);
        }