Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public static void AssertPublicMethod <TInstance, TPar1, TPar2>(this StructureTest test, Expression <Action <TInstance, TPar1, TPar2> > locator)
 {
     test.AssertMethod(locator, new MemberAccessLevelVerifier(AccessLevels.Public));
 }
Ejemplo n.º 3
0
        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);
        }