/** * Determine if the supplied {@code testMethod} is <em>enabled</em> in * the current environment, as specified by the {@link IfProfileValue * @IfProfileValue} annotation, which may be declared on the test * method itself or at the class level. Class-level usage overrides * method-level usage. * <p>Defaults to {@code true} if no {@link IfProfileValue * @IfProfileValue} annotation is declared. * @param testMethod the test method * @param testClass the test class * @return {@code true} if the test is <em>enabled</em> in the current * environment */ public static boolean isTestEnabledInThisEnvironment(Method testMethod, Class<?> testClass) { return isTestEnabledInThisEnvironment(retrieveProfileValueSource(testClass), testMethod, testClass); }
/** * Determine if the supplied {@code testClass} is <em>enabled</em> in * the current environment, as specified by the {@link IfProfileValue * @IfProfileValue} annotation at the class level. * <p>Defaults to {@code true} if no {@link IfProfileValue * @IfProfileValue} annotation is declared. * @param testClass the test class * @return {@code true} if the test is <em>enabled</em> in the current * environment */ public static boolean isTestEnabledInThisEnvironment(Class<?> testClass) { IfProfileValue ifProfileValue = AnnotatedElementUtils.findMergedAnnotation(testClass, IfProfileValue.class); return isTestEnabledInThisEnvironment(retrieveProfileValueSource(testClass), ifProfileValue); }
public static boolean isTestEnabledInThisEnvironment(Class<?> testClass) { IfProfileActive ifProfileActive = AnnotationUtils.findAnnotation(testClass, IfProfileActive.class); UnlessProfileActive unlessProfileActive = AnnotationUtils.findAnnotation(testClass, UnlessProfileActive.class); return isTestEnabledInThisEnvironment(ProfileValueUtils.retrieveProfileValueSource(testClass), ifProfileActive, unlessProfileActive); }
/** * Determine if the supplied {@code testMethod} is <em>enabled</em> in * the current environment, as specified by the {@link IfProfileValue * @IfProfileValue} annotation, which may be declared on the test * method itself or at the class level. Class-level usage overrides * method-level usage. * <p>Defaults to {@code true} if no {@link IfProfileValue * @IfProfileValue} annotation is declared. * @param testMethod the test method * @param testClass the test class * @return {@code true} if the test is <em>enabled</em> in the current * environment */ public static boolean isTestEnabledInThisEnvironment(Method testMethod, Class<?> testClass) { return isTestEnabledInThisEnvironment(retrieveProfileValueSource(testClass), testMethod, testClass); }
/** * Determine if the supplied {@code testMethod} is <em>enabled</em> in * the current environment, as specified by the {@link IfProfileValue * @IfProfileValue} annotation, which may be declared on the test * method itself or at the class level. Class-level usage overrides * method-level usage. * <p>Defaults to {@code true} if no {@link IfProfileValue * @IfProfileValue} annotation is declared. * @param testMethod the test method * @param testClass the test class * @return {@code true} if the test is <em>enabled</em> in the current * environment */ public static boolean isTestEnabledInThisEnvironment(Method testMethod, Class<?> testClass) { return isTestEnabledInThisEnvironment(retrieveProfileValueSource(testClass), testMethod, testClass); }
/** * Determine if the supplied {@code testClass} is <em>enabled</em> in * the current environment, as specified by the {@link IfProfileValue * @IfProfileValue} annotation at the class level. * <p>Defaults to {@code true} if no {@link IfProfileValue * @IfProfileValue} annotation is declared. * @param testClass the test class * @return {@code true} if the test is <em>enabled</em> in the current * environment */ public static boolean isTestEnabledInThisEnvironment(Class<?> testClass) { IfProfileValue ifProfileValue = AnnotatedElementUtils.findMergedAnnotation(testClass, IfProfileValue.class); return isTestEnabledInThisEnvironment(retrieveProfileValueSource(testClass), ifProfileValue); }
/** * Determine if the supplied {@code testClass} is <em>enabled</em> in * the current environment, as specified by the {@link IfProfileValue * @IfProfileValue} annotation at the class level. * <p>Defaults to {@code true} if no {@link IfProfileValue * @IfProfileValue} annotation is declared. * @param testClass the test class * @return {@code true} if the test is <em>enabled</em> in the current * environment */ public static boolean isTestEnabledInThisEnvironment(Class<?> testClass) { IfProfileValue ifProfileValue = AnnotatedElementUtils.findMergedAnnotation(testClass, IfProfileValue.class); return isTestEnabledInThisEnvironment(retrieveProfileValueSource(testClass), ifProfileValue); }