Package org.assertj.core.configuration
Class ConfigurationProvider
- java.lang.Object
-
- org.assertj.core.configuration.ConfigurationProvider
-
public final class ConfigurationProvider extends Object
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
Fields Modifier and Type Field Description private Configurationconfigurationstatic ConfigurationProviderCONFIGURATION_PROVIDERprivate Representationrepresentation
-
Constructor Summary
Constructors Modifier Constructor Description privateConfigurationProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Configurationconfiguration()Returns the configuration used in for all tests.static voidloadRegisteredConfiguration()Triggers loading any registeredConfiguration.Representationrepresentation()Returns the defaultRepresentationthat needs to be used within AssertJ, which is taken first from: a registeredConfiguration.representation()if any a registeredRepresentationIf no custom representation was registered, theStandardRepresentationwill be used.
-
-
-
Field Detail
-
CONFIGURATION_PROVIDER
public static final ConfigurationProvider CONFIGURATION_PROVIDER
-
representation
private final Representation representation
-
configuration
private final Configuration configuration
-
-
Method Detail
-
representation
public Representation representation()
Returns the defaultRepresentationthat needs to be used within AssertJ, which is taken first from:- a registered
Configuration.representation()if any - a registered
Representation
StandardRepresentationwill be used.- Returns:
- the default
Representationthat needs to be used within AssertJ - Since:
- 2.9.0 / 3.9.0
- a registered
-
configuration
public Configuration 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
Configurationlater on.
-
-