Class UnityLocalizationLocaleEditorUtilsTests
EditMode tests for the selected-locale helpers on Serenity.Global.Infrastructure.Editor.UnityLocalizationLocaleEditorUtils.
Mutates the project's real LocalizationSettings.SelectedLocale (there is no sandboxed equivalent for
this global piece of state), so every test captures it in SetUp() and restores it in
TearDown() — the same non-pollution discipline the Addressables fixtures follow.
Inherited Members
Namespace: Serenity.Localization.Tests.Editor
Assembly: Serenity.Localization.Tests.Editor.dll
Syntax
public class UnityLocalizationLocaleEditorUtilsTests
Remarks
The preview-session capture tests also erase the UnityEditor.SessionState keys backing
Serenity.Global.Infrastructure.Editor.UnityLocalizationLocaleEditorUtils.EnsurePreviewSessionCaptured in SetUp().
SessionState survives across test runs within the same editor session, so a stale "already captured"
flag from an earlier run would otherwise make these tests order-dependent.
Constructors
UnityLocalizationLocaleEditorUtilsTests()
Declaration
public UnityLocalizationLocaleEditorUtilsTests()
Methods
EnsurePreviewSessionCaptured_Should_BeIdempotent_When_CalledAgainAfterLocaleChanges()
Declaration
public void EnsurePreviewSessionCaptured_Should_BeIdempotent_When_CalledAgainAfterLocaleChanges()
EnsurePreviewSessionCaptured_Should_CaptureCurrentLocale_When_CalledFirstInSession()
Declaration
public void EnsurePreviewSessionCaptured_Should_CaptureCurrentLocale_When_CalledFirstInSession()
SetUp()
Declaration
public void SetUp()
TearDown()
Declaration
public void TearDown()
TryGetPreviewOriginalLocaleCode_Should_ReturnFalse_When_NothingCapturedYet()
Declaration
public void TryGetPreviewOriginalLocaleCode_Should_ReturnFalse_When_NothingCapturedYet()
TryRestorePreviewOriginalLocale_Should_ReinstateCapturedLocale()
Declaration
public void TryRestorePreviewOriginalLocale_Should_ReinstateCapturedLocale()
TryRestorePreviewOriginalLocale_Should_ReturnFalse_When_NothingCapturedYet()
Declaration
public void TryRestorePreviewOriginalLocale_Should_ReturnFalse_When_NothingCapturedYet()
TrySelectLocale_KnownCode_ChangesSelectedLocale()
Declaration
public void TrySelectLocale_KnownCode_ChangesSelectedLocale()
TrySelectLocale_UnknownCode_ReturnsFalseAndLeavesSelectionUntouched()
Declaration
public void TrySelectLocale_UnknownCode_ReturnsFalseAndLeavesSelectionUntouched()