Class TestEnvironmentDetector

java.lang.Object
org.axonframework.update.detection.TestEnvironmentDetector

@Internal public class TestEnvironmentDetector extends Object
This class detects whether the usage reporter is being used in a unit test environment, such as a JUnit test or another testing framework.
Since:
5.0.0
Author:
Mitchell Herrijgers
  • Field Details

    • AXONIQ_USAGE_FORCE_TEST_ENVIRONMENT

      public static final String AXONIQ_USAGE_FORCE_TEST_ENVIRONMENT
      System property to force the usage reporter to assume it's not a test environment. This is useful for testing purposes, where you want to skip the detection logic.
      See Also:
  • Constructor Details

    • TestEnvironmentDetector

      public TestEnvironmentDetector()
  • Method Details

    • isTestEnvironment

      public static boolean isTestEnvironment()
      Checks whether the current environment is a test environment.
      Returns:
      true if the current environment is a test environment, false otherwise.