Package dev.orne.i18n.context
Class ContextTestUtils
java.lang.Object
dev.orne.i18n.context.ContextTestUtils
Utility class for I18N context tests.
- Since:
- 0.1
- Version:
- 1.0, 2024-08
- Author:
- (w) Iker Hernaez
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
reset()
Resets the I18N configuration and context provider registry.static void
setConfiguration
(@NotNull ClassLoader cl, @NotNull Properties config) Sets the I18N configuration for the specified class loader.static void
setConfiguration
(@NotNull Properties config) Sets the I18N configuration for current thread context class loader.static void
setProvider
(@NotNull I18nContextProvider provider) Sets the I18N context provider for current thread context class loader.static void
setProvider
(@NotNull ClassLoader cl, @NotNull I18nContextProvider provider) Sets the I18N context provider for the specified class loader.
-
Method Details
-
reset
public static void reset()Resets the I18N configuration and context provider registry. -
setConfiguration
Sets the I18N configuration for current thread context class loader.- Parameters:
config
- The I18N configuration.
-
setConfiguration
public static void setConfiguration(@NotNull @NotNull ClassLoader cl, @NotNull @NotNull Properties config) Sets the I18N configuration for the specified class loader.- Parameters:
cl
- The class loader.config
- The I18N configuration.
-
setProvider
Sets the I18N context provider for current thread context class loader.- Parameters:
provider
- The I18N context provider.
-
setProvider
public static void setProvider(@NotNull @NotNull ClassLoader cl, @NotNull @NotNull I18nContextProvider provider) Sets the I18N context provider for the specified class loader.- Parameters:
cl
- The class loader.provider
- The I18N context provider.
-