Class IncludeCategories
- java.lang.Object
-
- org.junit.experimental.categories.CategoryFilterFactory
-
- org.junit.experimental.categories.IncludeCategories
-
- All Implemented Interfaces:
FilterFactory
public final class IncludeCategories extends CategoryFilterFactory
FilterFactory
to include categories. TheFilter
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);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
IncludeCategories.IncludesAny
-
Nested classes/interfaces inherited from interface org.junit.runner.FilterFactory
FilterFactory.FilterNotCreatedException
-
-
Constructor Summary
Constructors Constructor Description IncludeCategories()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Filter
createFilter(java.util.List<java.lang.Class<?>> categories)
Creates aFilter
which is only passed by tests that are categorized with any of the specified categories.-
Methods inherited from class org.junit.experimental.categories.CategoryFilterFactory
createFilter
-
-
-
-
Method Detail
-
createFilter
protected Filter createFilter(java.util.List<java.lang.Class<?>> categories)
Creates aFilter
which is only passed by tests that are categorized with any of the specified categories.- Specified by:
createFilter
in classCategoryFilterFactory
- Parameters:
categories
- Category classes.
-
-