Class ConditionEvaluationResult

    • Method Detail

      • enabled

        public static ConditionEvaluationResult enabled​(String reason)
        Factory for creating enabled results.
        Parameters:
        reason - the reason why the container or test should be enabled
        Returns:
        an enabled ConditionEvaluationResult with the given reason
      • disabled

        public static ConditionEvaluationResult disabled​(String reason)
        Factory for creating disabled results.
        Parameters:
        reason - the reason why the container or test should be disabled
        Returns:
        a disabled ConditionEvaluationResult with the given reason
      • disabled

        public static ConditionEvaluationResult disabled​(String reason,
                                                         String customReason)
        Factory for creating disabled results with custom reasons added by the user.
        Parameters:
        reason - the default reason why the container or test should be disabled
        customReason - the custom reason why the container or test should be disabled
        Returns:
        a disabled ConditionEvaluationResult with the given reasons
      • isDisabled

        public boolean isDisabled()
        Whether the container or test should be disabled.
        Returns:
        true if the container or test should be disabled
      • getReason

        public Optional<String> getReason()
        Get the reason why the container or test should be enabled or disabled, if available.