public static void AssertStaticMethod <TPar1, TPar2>(this StructureTest test, Expression <Action <TPar1, TPar2> > locator, params IMemberVerifier[] verifiers) { IMemberVerifier[] allVerifiers = verifiers.Union(new[] { new MemberIsStaticVerifier() }).ToArray(); MethodCallExpression methodCallExpression = (MethodCallExpression)locator.Body; test.AssertMethod(methodCallExpression.Method, allVerifiers); }
public static void AssertPublicMethod <TInstance, TPar1, TPar2>(this StructureTest test, Expression <Action <TInstance, TPar1, TPar2> > locator) { test.AssertMethod(locator, new MemberAccessLevelVerifier(AccessLevels.Public)); }
public static void AssertMethod <TInstance, TPar1, TPar2>(this StructureTest test, Expression <Action <TInstance, TPar1, TPar2> > locator, params IMemberVerifier[] verifiers) { MethodCallExpression methodCallExpression = (MethodCallExpression)locator.Body; test.AssertMethod(methodCallExpression.Method, verifiers); }