Class IncludeCategories

  • All Implemented Interfaces:
    FilterFactory

    public final class IncludeCategories
    extends CategoryFilterFactory
    FilterFactory to include categories. The Filter that is created will filter out tests that are categorized with any of the given categories. Usage from command line: --filter=org.junit.experimental.categories.IncludeCategories=pkg.of.Cat1,pkg.of.Cat2 Usage from API: new IncludeCategories().createFilter(Cat1.class, Cat2.class);
    • Constructor Detail

      • IncludeCategories

        public IncludeCategories()
    • Method Detail

      • createFilter

        protected Filter createFilter​(java.util.List<java.lang.Class<?>> categories)
        Creates a Filter which is only passed by tests that are categorized with any of the specified categories.
        Specified by:
        createFilter in class CategoryFilterFactory
        Parameters:
        categories - Category classes.