Class ProfileValueUtils
java.lang.Object
org.springframework.test.annotation.ProfileValueUtils
Deprecated.
since Spring Framework 7.0 with no replacement
General utility methods for working with profile values.
- Since:
- 2.5
- Author:
- Sam Brannen, Juergen Hoeller
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisTestEnabledInThisEnvironment(Class<?> testClass) Deprecated.Determine if the suppliedtestClassis enabled in the current environment, as specified by the@IfProfileValueannotation at the class level.static booleanisTestEnabledInThisEnvironment(Method testMethod, Class<?> testClass) Deprecated.Determine if the suppliedtestMethodis enabled in the current environment, as specified by the@IfProfileValueannotation, which may be declared on the test method itself or at the class level.static booleanisTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, Method testMethod, Class<?> testClass) Deprecated.Determine if the suppliedtestMethodis enabled in the current environment, as specified by the@IfProfileValueannotation, which may be declared on the test method itself or at the class level.static ProfileValueSourceretrieveProfileValueSource(Class<?> testClass) Deprecated.Retrieves theProfileValueSourcetype for the specifiedtest classas configured via the@ProfileValueSourceConfigurationannotation and instantiates a new instance of that type.
-
Constructor Details
-
ProfileValueUtils
public ProfileValueUtils()Deprecated.
-
-
Method Details
-
retrieveProfileValueSource
Deprecated.Retrieves theProfileValueSourcetype for the specifiedtest classas configured via the@ProfileValueSourceConfigurationannotation and instantiates a new instance of that type.If
@ProfileValueSourceConfigurationis not present on the specified class or if a customProfileValueSourceis not declared, the defaultSystemProfileValueSourcewill be returned instead.- Parameters:
testClass- the test class for which the ProfileValueSource should be retrieved- Returns:
- the configured (or default) ProfileValueSource for the specified class
- See Also:
-
isTestEnabledInThisEnvironment
Deprecated.Determine if the suppliedtestClassis enabled in the current environment, as specified by the@IfProfileValueannotation at the class level.Defaults to
trueif no@IfProfileValueannotation is declared.- Parameters:
testClass- the test class- Returns:
trueif the test is enabled in the current environment
-
isTestEnabledInThisEnvironment
Deprecated.Determine if the suppliedtestMethodis enabled in the current environment, as specified by the@IfProfileValueannotation, which may be declared on the test method itself or at the class level. Class-level usage overrides method-level usage.Defaults to
trueif no@IfProfileValueannotation is declared.- Parameters:
testMethod- the test methodtestClass- the test class- Returns:
trueif the test is enabled in the current environment
-
isTestEnabledInThisEnvironment
public static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, Method testMethod, Class<?> testClass) Deprecated.Determine if the suppliedtestMethodis enabled in the current environment, as specified by the@IfProfileValueannotation, which may be declared on the test method itself or at the class level. Class-level usage overrides method-level usage.Defaults to
trueif no@IfProfileValueannotation is declared.- Parameters:
profileValueSource- the ProfileValueSource to use to determine if the test is enabledtestMethod- the test methodtestClass- the test class- Returns:
trueif the test is enabled in the current environment
-