|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.test.annotation.ProfileValueUtils
public abstract class ProfileValueUtils
General utility methods for working with profile values.
ProfileValueSource,
ProfileValueSourceConfiguration,
IfProfileValue| Constructor Summary | |
|---|---|
ProfileValueUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
isTestEnabledInThisEnvironment(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(Method testMethod,
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,
Method testMethod,
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(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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProfileValueUtils()
| Method Detail |
|---|
public static ProfileValueSource retrieveProfileValueSource(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 retrieved
SystemProfileValueSourcepublic static boolean isTestEnabledInThisEnvironment(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 class
true if the test is enabled in the
current environment
public static boolean isTestEnabledInThisEnvironment(Method testMethod,
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.
Defaults to true if no
@IfProfileValue annotation is declared.
testMethod - the test methodtestClass - the test class
true if the test is enabled in the
current environment
public static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource,
Method testMethod,
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.
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 class
true if the test is enabled in the
current environment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||