Пример #1
0
    public void GetQueryOperatorExpression_ArrayLength_NotRegistered ()
    {
      var expressionTreeParser = new ExpressionTreeParser (new MethodInfoBasedNodeTypeRegistry (), new NullExpressionTreeProcessor ());
      var memberExpression = (UnaryExpression) ExpressionHelper.MakeExpression (() => new int[0].Length);
      var queryOperatorExpression = expressionTreeParser.GetQueryOperatorExpression (memberExpression);

      Assert.That (queryOperatorExpression, Is.Null);
    }
Пример #2
0
    public void GetQueryOperatorExpression_MemberExpression_NotRegistered ()
    {
      var expressionTreeParser = new ExpressionTreeParser (new MethodInfoBasedNodeTypeRegistry (), new NullExpressionTreeProcessor ());
      var memberExpression = (MemberExpression) ExpressionHelper.MakeExpression (() => new List<int> ().Count);
      var queryOperatorExpression = expressionTreeParser.GetQueryOperatorExpression (memberExpression);

      Assert.That (queryOperatorExpression, Is.Null);
    }