org.junit.experimental.categories
Class Categories.CategoryFilter

java.lang.Object
  extended by org.junit.runner.manipulation.Filter
      extended by org.junit.experimental.categories.Categories.CategoryFilter
Enclosing class:
Categories

public static class Categories.CategoryFilter
extends Filter


Field Summary
 
Fields inherited from class org.junit.runner.manipulation.Filter
ALL
 
Constructor Summary
protected Categories.CategoryFilter(boolean matchAnyIncludes, Set<Class<?>> includes, boolean matchAnyExcludes, Set<Class<?>> excludes)
           
  Categories.CategoryFilter(Class<?> includedCategory, Class<?> excludedCategory)
          Deprecated. 
 
Method Summary
static Categories.CategoryFilter categoryFilter(boolean matchAnyInclusions, Set<Class<?>> inclusions, boolean matchAnyExclusions, Set<Class<?>> exclusions)
           
 String describe()
          Returns a textual description of this Filter
static Categories.CategoryFilter exclude(boolean matchAny, Class<?>... categories)
           
static Categories.CategoryFilter exclude(Class<?>... categories)
           
static Categories.CategoryFilter exclude(Class<?> category)
           
static Categories.CategoryFilter include(boolean matchAny, Class<?>... categories)
           
static Categories.CategoryFilter include(Class<?>... categories)
           
static Categories.CategoryFilter include(Class<?> category)
           
 boolean shouldRun(Description description)
           
 String toString()
          Returns string in the form "[included categories] - [excluded categories]", where both sets have comma separated names of categories.
 
Methods inherited from class org.junit.runner.manipulation.Filter
apply, intersect, matchMethodDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Categories.CategoryFilter

@Deprecated
public Categories.CategoryFilter(Class<?> includedCategory,
                                            Class<?> excludedCategory)
Deprecated. 


Categories.CategoryFilter

protected Categories.CategoryFilter(boolean matchAnyIncludes,
                                    Set<Class<?>> includes,
                                    boolean matchAnyExcludes,
                                    Set<Class<?>> excludes)
Method Detail

include

public static Categories.CategoryFilter include(boolean matchAny,
                                                Class<?>... categories)

include

public static Categories.CategoryFilter include(Class<?> category)

include

public static Categories.CategoryFilter include(Class<?>... categories)

exclude

public static Categories.CategoryFilter exclude(boolean matchAny,
                                                Class<?>... categories)

exclude

public static Categories.CategoryFilter exclude(Class<?> category)

exclude

public static Categories.CategoryFilter exclude(Class<?>... categories)

categoryFilter

public static Categories.CategoryFilter categoryFilter(boolean matchAnyInclusions,
                                                       Set<Class<?>> inclusions,
                                                       boolean matchAnyExclusions,
                                                       Set<Class<?>> exclusions)

describe

public String describe()
Description copied from class: Filter
Returns a textual description of this Filter

Specified by:
describe in class Filter
Returns:
a textual description of this Filter
See Also:
toString()

toString

public String toString()
Returns string in the form "[included categories] - [excluded categories]", where both sets have comma separated names of categories.

Overrides:
toString in class Object
Returns:
string representation for the relative complement of excluded categories set in the set of included categories. Examples:
  • "categories [all]" for all included categories and no excluded ones;
  • "categories [all] - [A, B]" for all included categories and given excluded ones;
  • "categories [A, B] - [C, D]" for given included categories and given excluded ones.
See Also:
name of category

shouldRun

public boolean shouldRun(Description description)
Specified by:
shouldRun in class Filter
Parameters:
description - the description of the test to be run
Returns:
true if the test should be run


Copyright © 2002–2021 JUnit. All rights reserved.