Class ExcludeCategories
- java.lang.Object
-
- org.junit.experimental.categories.ExcludeCategories
-
- All Implemented Interfaces:
FilterFactory
public final class ExcludeCategories extends java.lang.Object
FilterFactory
to exclude 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.ExcludeCategories=pkg.of.Cat1,pkg.of.Cat2
Usage from API:new ExcludeCategories().createFilter(Cat1.class, Cat2.class);
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.runner.FilterFactory
FilterFactory.FilterNotCreatedException
-
-
Constructor Summary
Constructors Constructor Description ExcludeCategories()
-
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 not categorized with any of the specified categories.Filter
createFilter(FilterFactoryParams params)
Creates aCategories.CategoryFilter
given aFilterFactoryParams
argument.
-
-
-
Constructor Detail
-
ExcludeCategories
public ExcludeCategories()
-
-
Method Detail
-
createFilter
protected Filter createFilter(java.util.List<java.lang.Class<?>> categories)
Creates aFilter
which is only passed by tests that are not categorized with any of the specified categories.- Parameters:
categories
- Category classes.
-
createFilter
public Filter createFilter(FilterFactoryParams params) throws FilterFactory.FilterNotCreatedException
Creates aCategories.CategoryFilter
given aFilterFactoryParams
argument.- Specified by:
createFilter
in interfaceFilterFactory
- Parameters:
params
- Parameters needed to create theFilter
- Throws:
FilterFactory.FilterNotCreatedException
-
-