kotest-extensions / io.kotest.extensions.locale / LocaleTestListener

LocaleTestListener

class LocaleTestListener : LocaleListener, TestListener

Replaces the default Locale

This listener replaces the current default locale with locale, then executes the test and finally returns the original default locale to it's place.

Attention: This code is subject to race conditions. The System can only have one default locale, and if you change the locale while it was already changed, the result may be inconsistent.

Constructors

<init>

Replaces the default Locale

LocaleTestListener(locale: Locale)

Functions

afterTest

suspend fun afterTest(testCase: TestCase, result: TestResult): Unit

beforeTest

suspend fun beforeTest(testCase: TestCase): Unit