-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed as not planned
Labels
Description
Issue #194 suggests treating all annotations as meta-annotations.
While discussions about the relative costs and benefits of that proposal continue, there should be a way (in junit or junit.contrib) for a test developer to "opt-in" to meta-annotations. The obvious thing to try is using a custom runner:
@RunWith(MetaAnnotations.class)
@MetaAnnotationForClass
public class TestClass {
@MetaAnnotationOnMethod public void foo();
}
Making this work will likely require some method extraction on BlockJUnit4ClassRunner. MetaAnnotations could override getAnnotatedMethods, but statements like
method.getAnnotation(Ignore.class) != null
Would need to be changed to call a protected method:
getAnnotation(method, Ignore.class) != null
So that MetaAnnotations could override getAnnotation.