org.springframework.test.annotation

Class ProfileValueUtils

  • java.lang.Object
    • org.springframework.test.annotation.ProfileValueUtils
    • Constructor Detail

      • ProfileValueUtils

        public ProfileValueUtils()
    • Method Detail

      • isTestEnabledInThisEnvironment

        public 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.

        Defaults to true if no @IfProfileValue annotation is declared.

        Parameters:
        testClass - the test class
        Returns:
        true if the test is enabled in the current environment
      • isTestEnabledInThisEnvironment

        public 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. Class-level usage overrides method-level usage.

        Defaults to true if no @IfProfileValue annotation is declared.

        Parameters:
        testMethod - the test method
        testClass - the test class
        Returns:
        true if the test is enabled in the current environment
      • isTestEnabledInThisEnvironment

        public 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. Class-level usage overrides method-level usage.

        Defaults to true if no @IfProfileValue annotation is declared.

        Parameters:
        profileValueSource - the ProfileValueSource to use to determine if the test is enabled
        testMethod - the test method
        testClass - the test class
        Returns:
        true if the test is enabled in the current environment