Наследование: System.Linq.Expressions.ExpressionTreeVisitor, IUnresolvedSqlExpressionVisitor
    public void VisitExpression_AnyOtherExpression ()
    {
      var visitor = new GroupAggregateSimplifier.SimplifyingVisitor (_resolvedJoinedGroupingTable, _associatedGroupingSelectExpression.ElementExpression);

      var input = Expression.Constant (0);
      var result = visitor.VisitExpression (input);

      Assert.That (visitor.CanBeTransferredToGroupingSource, Is.True);
      Assert.That (result, Is.SameAs (input));
    }
    public void VisitExpression_ReferenceToRightTable_Nested ()
    {
      var visitor = new GroupAggregateSimplifier.SimplifyingVisitor (_resolvedJoinedGroupingTable, _associatedGroupingSelectExpression.ElementExpression);

      var input = Expression.Equal (
          new SqlTableReferenceExpression (_resolvedJoinedGroupingTable), 
          new SqlTableReferenceExpression (_resolvedJoinedGroupingTable));
      
      var result = visitor.VisitExpression (input);

      Assert.That (visitor.CanBeTransferredToGroupingSource, Is.True);
      var expectedResult = Expression.Equal (
          _associatedGroupingSelectExpression.ElementExpression,
          _associatedGroupingSelectExpression.ElementExpression);
      SqlExpressionTreeComparer.CheckAreEqualTrees (expectedResult, result);
    }
    public void VisitExpression_ReferenceToOtherTable ()
    {
      var visitor = new GroupAggregateSimplifier.SimplifyingVisitor (_resolvedJoinedGroupingTable, _associatedGroupingSelectExpression.ElementExpression);

      var input = new SqlTableReferenceExpression (SqlStatementModelObjectMother.CreateSqlTable());
      visitor.VisitExpression (input);

      Assert.That (visitor.CanBeTransferredToGroupingSource, Is.False);
    }
    public void VisitExpression_ReferenceToRightTable ()
    {
      var visitor = new GroupAggregateSimplifier.SimplifyingVisitor (_resolvedJoinedGroupingTable, _associatedGroupingSelectExpression.ElementExpression);

      var input = new SqlTableReferenceExpression (_resolvedJoinedGroupingTable);
      var result = visitor.VisitExpression (input);

      Assert.That (visitor.CanBeTransferredToGroupingSource, Is.True);
      Assert.That (result, Is.SameAs (_associatedGroupingSelectExpression.ElementExpression));
    }