public InterceptionTestCase(Expression <Action> expression)
            {
                var parser = new CallExpressionParser();
                var parsed = parser.Parse(expression);

                this.Method = parsed.CalledMethod;
                this.Target = parsed.CallTarget;
            }
Пример #2
0
            protected static T Create <T>(Expression <Action> expression) where T : InterceptionTestCase, new()
            {
                var parser = new CallExpressionParser();
                var parsed = parser.Parse(expression);

                return(new T()
                {
                    Method = parsed.CalledMethod,
                    Target = parsed.CallTarget
                });
            }