Class ProfileValueChecker
java.lang.Object
org.junit.runners.model.Statement
org.springframework.test.context.junit4.statements.ProfileValueChecker
ProfileValueChecker is a custom JUnit Statement that checks
 whether a test class or test method is enabled in the current environment
 via Spring's @IfProfileValue annotation.- Since:
- 4.2
- Author:
- Sam Brannen, Philippe Marschall
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionProfileValueChecker(Statement next, Class<?> testClass, @Nullable Method testMethod) Construct a newProfileValueCheckerstatement.
- 
Method SummaryModifier and TypeMethodDescriptionvoidevaluate()Determine if the test specified by arguments to the constructor is enabled in the current environment, as configured via the@IfProfileValueannotation.
- 
Constructor Details- 
ProfileValueCheckerConstruct a newProfileValueCheckerstatement.- Parameters:
- next- the next- Statementin the execution chain; never- null
- testClass- the test class to check; never- null
- testMethod- the test method to check; may be- nullif this- ProfileValueCheckeris being applied at the class level
 
 
- 
- 
Method Details- 
evaluateDetermine if the test specified by arguments to the constructor is enabled in the current environment, as configured via the@IfProfileValueannotation.If the test is not annotated with @IfProfileValueit is considered enabled.If a test is not enabled, this method will abort further evaluation of the execution chain with a failed assumption; otherwise, this method will simply evaluate the next Statementin the execution chain.- Specified by:
- evaluatein class- Statement
- Throws:
- AssumptionViolatedException- if the test is disabled
- Throwable- if evaluation of the next statement fails
- See Also:
 
 
-