Class TestEnvironmentDetector
java.lang.Object
org.axonframework.update.detection.TestEnvironmentDetector
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property to force the usage reporter to assume it's not a test environment. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks whether the current environment is a test environment.
-
Field Details
-
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:
trueif the current environment is a test environment,falseotherwise.
-