Package org.dbunit

Class TurkishLocaleExtension

java.lang.Object
org.dbunit.TurkishLocaleExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension

public class TurkishLocaleExtension extends Object implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
Temporarily switches the JVM default Locale to Turkish (tr-TR) for the duration of a @TurkishDefaultLocale-annotated test method, restoring the original default afterward regardless of the test's outcome.

Centralizes the save/mutate/restore steps needed to reproduce Turkish-locale-specific bugs - e.g. an un-pinned toUpperCase()/toLowerCase() folding i/I to the dotted/dotless variants İ/ı - instead of duplicating them in every affected test class.

Since:
3.4.0
  • Constructor Details

    • TurkishLocaleExtension

      public TurkishLocaleExtension()
  • Method Details

    • beforeEach

      public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
      Specified by:
      beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback
    • afterEach

      public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context)
      Specified by:
      afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback