Class GroupEvaluator
- java.lang.Object
-
- com.carrotsearch.randomizedtesting.GroupEvaluator
-
public final class GroupEvaluator extends java.lang.Object
Evaluates enabled/ disabled state for a given test group.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
GroupEvaluator.TestGroupInfo
-
Field Summary
Fields Modifier and Type Field Description private FilterExpressionParser.Node
filter
private java.lang.String
filterExpression
private java.util.HashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,GroupEvaluator.TestGroupInfo>
testGroups
-
Constructor Summary
Constructors Constructor Description GroupEvaluator(java.util.List<RandomizedRunner.TestCandidate> testCandidates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
appendGroupFilteringOptions(ReproduceErrorMessageBuilder builder)
private java.util.HashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,GroupEvaluator.TestGroupInfo>
collectGroups(java.util.List<RandomizedRunner.TestCandidate> testCandidates)
java.lang.String
getIgnoreReason(java.lang.reflect.AnnotatedElement... elements)
(package private) boolean
hasFilteringExpression()
boolean
isGroupEnabled(java.lang.Class<? extends java.lang.annotation.Annotation> testGroupAnnotation)
private java.lang.String
toString(java.lang.annotation.Annotation ann)
-
-
-
Field Detail
-
testGroups
private final java.util.HashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,GroupEvaluator.TestGroupInfo> testGroups
-
filter
private final FilterExpressionParser.Node filter
-
filterExpression
private java.lang.String filterExpression
-
-
Constructor Detail
-
GroupEvaluator
GroupEvaluator(java.util.List<RandomizedRunner.TestCandidate> testCandidates)
-
-
Method Detail
-
collectGroups
private java.util.HashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,GroupEvaluator.TestGroupInfo> collectGroups(java.util.List<RandomizedRunner.TestCandidate> testCandidates)
-
appendGroupFilteringOptions
void appendGroupFilteringOptions(ReproduceErrorMessageBuilder builder)
-
hasFilteringExpression
boolean hasFilteringExpression()
-
getIgnoreReason
public java.lang.String getIgnoreReason(java.lang.reflect.AnnotatedElement... elements)
- Returns:
- Returns a non-null string with the reason why the annotated element (class, test or test-class pair) should be ignored in the execution. This is an expert-level method, typically tests shouldn't be concerned with this.
-
toString
private java.lang.String toString(java.lang.annotation.Annotation ann)
-
isGroupEnabled
public boolean isGroupEnabled(java.lang.Class<? extends java.lang.annotation.Annotation> testGroupAnnotation)
- Returns:
- Returns the current state of the an annotation marked with
TestGroup
. Note that tests may be enabled or disabled using filtering expressions so an enabled group does not necessarily mean a test marked with this group will be executed.
-
-