类 ProfileValueUtils
java.lang.Object
cn.taketoday.test.annotation.ProfileValueUtils
General utility methods for working with profile values.
- 从以下版本开始:
- 4.0
- 作者:
- Sam Brannen, Juergen Hoeller
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static booleanisTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, IfProfileValue ifProfileValue) Determine if thevalue(or one of thevalues) in the supplied@IfProfileValueannotation is enabled in the current environment.static booleanisTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, Method testMethod, Class<?> testClass) 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(Class<?> testClass) Determine if the suppliedtestClassis enabled in the current environment, as specified by the@IfProfileValueannotation at the class level.static booleanisTestEnabledInThisEnvironment(Method testMethod, Class<?> testClass) 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) Retrieves theProfileValueSourcetype for the specifiedtest classas configured via the@ProfileValueSourceConfigurationannotation and instantiates a new instance of that type.
-
字段详细资料
-
logger
private static final cn.taketoday.logging.Logger logger
-
-
构造器详细资料
-
ProfileValueUtils
public ProfileValueUtils()
-
-
方法详细资料
-
retrieveProfileValueSource
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.- 参数:
testClass- the test class for which the ProfileValueSource should be retrieved- 返回:
- the configured (or default) ProfileValueSource for the specified class
- 另请参阅:
-
isTestEnabledInThisEnvironment
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.- 参数:
testClass- the test class- 返回:
trueif the test is enabled in the current environment
-
isTestEnabledInThisEnvironment
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.- 参数:
testMethod- the test methodtestClass- the test class- 返回:
trueif the test is enabled in the current environment
-
isTestEnabledInThisEnvironment
public static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, Method testMethod, Class<?> testClass) 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.- 参数:
profileValueSource- the ProfileValueSource to use to determine if the test is enabledtestMethod- the test methodtestClass- the test class- 返回:
trueif the test is enabled in the current environment
-
isTestEnabledInThisEnvironment
private static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, @Nullable IfProfileValue ifProfileValue) Determine if thevalue(or one of thevalues) in the supplied@IfProfileValueannotation is enabled in the current environment.- 参数:
profileValueSource- the ProfileValueSource to use to determine if the test is enabledifProfileValue- the annotation to introspect; may benull- 返回:
trueif the test is enabled in the current environment or if the suppliedifProfileValueisnull
-