public void Simplify_Calls_All_Passed_Simplifiers() { mChecker.IsEqual(Arg.Any <IExpression>(), Arg.Any <IExpression>()).Returns(true); var afterFirst = new Constant(); var input = new Constant(); mFirstSimplifier.Simplify(input).Returns(afterFirst); mUnderTest.Simplify(input); mSecondSimplifier.Received().Simplify(afterFirst); }
internal Expression Translate(Expression expression) { if (expression is ProjectionExpression projection) { return(projection); } expression = Evaluator.PartialEval(expression, CanBeEvaluatedLocally); expression = QueryBinder.Bind(this, expression); expression = ConstantEscaper.EscapeConstants(expression); expression = OrderByRewriter.Rewrite(expression); expression = RedundantSubqueryRemover.Remove(expression); expression = UnusedColumnRemover.Remove(expression); expression = AggregateSimplifier.Simplify(expression); return(expression); }