Beispiel #1
0
        public void Should_replace_ExtractBody_with_lambda_body_provided_as_instance_method_returnvalue()
        {
            var myObj = new MyObject();
            Expression <Func <MyObject, bool> > expression = o => o.MyProperty == myObj.GetExpressionFromInstanceMethod().ExtractBody(o);

            var visitedExpression = ExpressionBodyExtractingVisitor.Rewrite(expression);

            ValidateVisitedExpressions(expression, visitedExpression);
        }