Class AnnotatedMethodProvider

java.lang.Object
com.carrotsearch.randomizedtesting.AnnotatedMethodProvider
All Implemented Interfaces:
TestMethodProvider
Direct Known Subclasses:
JUnit4MethodProvider

public abstract class AnnotatedMethodProvider extends Object implements TestMethodProvider
Base class for TestMethodProviders based on annotations.
  • Field Details

  • Constructor Details

    • AnnotatedMethodProvider

      public AnnotatedMethodProvider(Class<? extends Annotation> ann)
  • Method Details

    • getTestMethods

      public Collection<Method> getTestMethods(Class<?> suiteClass, ClassModel suiteClassModel)
      Description copied from interface: TestMethodProvider
      Determine which methods are test methods. The contract is that methods must be public, instance bound (not static) and parameterless. No other restrictions apply (as if these weren't enough...).
      Specified by:
      getTestMethods in interface TestMethodProvider
      Parameters:
      suiteClass - The suite class.
      suiteClassModel - A precomputed model of the suite class including method annotations and class hierarchy walking utilities. This is made available for performance reasons only.
      Returns:
      Return a set of methods which should be invoked by the runner as tests.