Class ContextTestUtils

java.lang.Object
dev.orne.i18n.context.ContextTestUtils

public final class ContextTestUtils extends Object
Utility class for I18N context tests.
Since:
0.1
Version:
1.0, 2024-08
Author:
(w) Iker Hernaez
  • Method Details

    • reset

      public static void reset()
      Resets the I18N configuration and context provider registry.
    • setConfiguration

      public static void setConfiguration(@NotNull @NotNull Properties config)
      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

      public static void setProvider(@NotNull @NotNull I18nContextProvider provider)
      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.