Package org.assertj.core.configuration
Class ConfigurationProvider
java.lang.Object
org.assertj.core.configuration.ConfigurationProvider
Provider for all the configuration settings / parameters within AssertJ.
All the configuration possibilities are registered via an SPI.
- Since:
- 2.9.0 / 3.9.0
- Author:
- Filip Hrisafov
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the configuration used in for all tests.static void
Triggers loading any registeredConfiguration
.Returns theRepresentation
that AssertJ will use, which is taken first from: the representation returned by a customConfiguration
throughConfiguration.representation()
but only if it is different from theStandardRepresentation
theRepresentation
with highest priority loaded from the classpath by theServiceLoader
If no custom representation was registered or overridden in a specificConfiguration
, theStandardRepresentation
is used.
-
Field Details
-
CONFIGURATION_PROVIDER
-
-
Method Details
-
representation
Returns theRepresentation
that AssertJ will use, which is taken first from:- the representation returned by a custom
Configuration
throughConfiguration.representation()
but only if it is different from theStandardRepresentation
- the
Representation
with highest priority loaded from the classpath by theServiceLoader
Configuration
, theStandardRepresentation
is used.- Returns:
- the default
Representation
that needs to be used within AssertJ - Since:
- 2.9.0 / 3.9.0, 3.22.0 support for registered multiple
Representation
s with priority.
- the representation returned by a custom
-
configuration
Returns the configuration used in for all tests.- Returns:
- the configuration applied for all tests.
- Since:
- 3.13.0
-
loadRegisteredConfiguration
public static void loadRegisteredConfiguration()Triggers loading any registeredConfiguration
.This method should be called before any user configuration changes to make sure these are not overridden by a registered
Configuration
later on.
-