Ejemplo n.º 1
0
        public TResult Execute <TResult>(Expression expression)
        {
            var replaced = new MockSetupsBuilder().Visit(expression);

            var lambda = Expression.Lambda <Func <TResult> >(replaced);

            return(lambda.CompileUsingExpressionCompiler().Invoke());
        }
Ejemplo n.º 2
0
        public TResult Execute <TResult>(Expression expression)
        {
            var replaced = new MockSetupsBuilder(this.underlyingCreateMocks).Visit(expression);

            var lambda = Expression.Lambda <Func <TResult> >(replaced);

            return(lambda.Compile().Invoke());
        }