private static void ignoreTestAtClass(Class<?> clazz, ITestAnnotation annotation) { if (clazz != null) { ignoreTest(annotation, ReflectionHelper.findAnnotation(clazz, Ignore.class)); Package testPackage = clazz.getPackage(); if (testPackage != null) { ignoreTest(annotation, findAnnotation(testPackage)); } } }
@Override public void transform(ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) { if (!annotation.getEnabled()) { return; } Class<?> typedTestClass = testClass; if (testMethod != null) { ignoreTest(annotation, testMethod.getAnnotation(Ignore.class)); typedTestClass = testMethod.getDeclaringClass(); } if (typedTestClass != null) { ignoreTest(annotation, ReflectionHelper.findAnnotation(typedTestClass, Ignore.class)); Package testPackage = typedTestClass.getPackage(); if (testPackage != null) { ignoreTest(annotation, findAnnotation(testPackage)); } } }