예제 #1
0
        static Error ValidateMethod(string name, MethodGroup value, IEnumerable<MethodInfo> methods)
        {
            methods = methods.Where(m => m.Name == name).ToArray();
            if (!value.All(mock => methods.Any(m => mock.RepresentsMethod(m))))
                return new Error(Errors.CannotFindMethodToOverride, "Cannot find method \"" + name + "\" with the given parameters to mock.");

            return null;
        }