public abstract class ProfileValueUtils
extends java.lang.Object
ProfileValueSource
,
ProfileValueSourceConfiguration
,
IfProfileValue
Constructor and Description |
---|
ProfileValueUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isTestEnabledInThisEnvironment(java.lang.Class<?> testClass)
Determine if the supplied
testClass is enabled in
the current environment, as specified by the @IfProfileValue annotation at the class level. |
static boolean |
isTestEnabledInThisEnvironment(java.lang.reflect.Method testMethod,
java.lang.Class<?> testClass)
Determine if the supplied
testMethod is enabled in
the current environment, as specified by the @IfProfileValue annotation, which may be declared on the test
method itself or at the class level. |
static boolean |
isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource,
java.lang.reflect.Method testMethod,
java.lang.Class<?> testClass)
Determine if the supplied
testMethod is enabled in
the current environment, as specified by the @IfProfileValue annotation, which may be declared on the test
method itself or at the class level. |
static ProfileValueSource |
retrieveProfileValueSource(java.lang.Class<?> testClass)
Retrieves the
ProfileValueSource type for the specified
test class as configured via the
@ProfileValueSourceConfiguration annotation and instantiates a new
instance of that type. |
public static ProfileValueSource retrieveProfileValueSource(java.lang.Class<?> testClass)
ProfileValueSource
type for the specified
test class
as configured via the
@ProfileValueSourceConfiguration
annotation and instantiates a new
instance of that type.
If @ProfileValueSourceConfiguration
is not present on the specified
class or if a custom ProfileValueSource
is not declared, the
default SystemProfileValueSource
will be returned instead.
testClass
- The test class for which the ProfileValueSource should
be retrievedSystemProfileValueSource
public static boolean isTestEnabledInThisEnvironment(java.lang.Class<?> testClass)
testClass
is enabled in
the current environment, as specified by the @IfProfileValue
annotation at the class level.
Defaults to true
if no @IfProfileValue
annotation is declared.
testClass
- the test classtrue
if the test is enabled in the current
environmentpublic static boolean isTestEnabledInThisEnvironment(java.lang.reflect.Method testMethod, java.lang.Class<?> testClass)
testMethod
is enabled in
the current environment, as specified by the @IfProfileValue
annotation, which may be declared on the test
method itself or at the class level. Class-level usage overrides
method-level usage.
Defaults to true
if no @IfProfileValue
annotation is declared.
testMethod
- the test methodtestClass
- the test classtrue
if the test is enabled in the current
environmentpublic static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, java.lang.reflect.Method testMethod, java.lang.Class<?> testClass)
testMethod
is enabled in
the current environment, as specified by the @IfProfileValue
annotation, which may be declared on the test
method itself or at the class level. Class-level usage overrides
method-level usage.
Defaults to true
if no @IfProfileValue
annotation is declared.
profileValueSource
- the ProfileValueSource to use to determine if
the test is enabledtestMethod
- the test methodtestClass
- the test classtrue
if the test is enabled in the current
environment