Class UiSettingsCreatorTests
EditMode tests for UiSettingsCreator: field validation and, in a temporary folder, actual
settings asset creation — including the create-vs-update singleton contract and
EnsureSettings(string, bool, string)'s found/created/error outcomes. Every fixture uses an
explicit Serenity.Ui.Tests.Editor.UiSettingsCreatorTests.TempFolder and either an explicit new-asset path, an explicit
UiSettingsCreator.Input.ExistingSettingsAssetPath, or — for
EnsureSettings(string, bool, string) — its searchRootFolder test seam, so these tests
stay hermetic even though the package ships its own real singleton at
Assets/Serenity/Media/Ui/UiSettings.asset; that asset is never touched here. Mirrors
Serenity.Menu.Tests.Editor.MenuServiceSettingsCreatorTests.
Inherited Members
Namespace: Serenity.Ui.Tests.Editor
Assembly: Tests.Editor.dll
Syntax
public class UiSettingsCreatorTests
Constructors
UiSettingsCreatorTests()
Declaration
public UiSettingsCreatorTests()
Methods
Create_AssignsAGuid()
Declaration
public void Create_AssignsAGuid()
Create_ExistingAsset_LeavesPrewarmLabelsAndAddressesUntouched()
Declaration
public void Create_ExistingAsset_LeavesPrewarmLabelsAndAddressesUntouched()
Create_Existing_EditsInPlace()
Declaration
public void Create_Existing_EditsInPlace()
Create_FailureRollsBack()
Forces a genuine failure the same way SettingsAssetAuthoring.VerifyAssetWasWrittenToDisk's own
doc comment describes: a folder Unity's AssetDatabase cache still reports as valid, but that
has actually been removed from disk directly. Mirrors MenuServiceSettingsCreatorTests' and
SoundMixerSettingsCreatorTests' identical regression test.
Declaration
public void Create_FailureRollsBack()
Create_FreshAsset_KeepsTheThreeDefaultFontSizePresets()
Declaration
public void Create_FreshAsset_KeepsTheThreeDefaultFontSizePresets()
Create_NoExisting_CreatesAtTheGivenPath()
Declaration
public void Create_NoExisting_CreatesAtTheGivenPath()
Create_RegisterAsAddressablesFalse_NoAddressablesPollution()
Declaration
public void Create_RegisterAsAddressablesFalse_NoAddressablesPollution()
Create_UpdateRunAgainstAnExistingAsset_DoesNotCreateTheOutputFolder()
Declaration
public void Create_UpdateRunAgainstAnExistingAsset_DoesNotCreateTheOutputFolder()
Create_WritesInitialViewIdThemeAndUiRoot()
Declaration
public void Create_WritesInitialViewIdThemeAndUiRoot()
EnsureSettings_NoneExists_CreatesOneWithDefaults()
Declaration
public void EnsureSettings_NoneExists_CreatesOneWithDefaults()
EnsureSettings_OneExists_ReturnsItWithoutMutating()
Scopes the singleton scan to Serenity.Ui.Tests.Editor.UiSettingsCreatorTests.TempFolder via searchRootFolder so this test's own
fixture is the only UnityUiSettings asset the scan can see — without that seam this
would collide with the package's shipped singleton at Assets/Serenity/Media/Ui/UiSettings.asset
and the project would (correctly) need exactly one UnityUiSettings asset in total for
this test to be deterministic. Asserts the found asset is returned untouched, not recreated.
Declaration
public void EnsureSettings_OneExists_ReturnsItWithoutMutating()
OneTimeTearDown()
Declaration
public void OneTimeTearDown()
SetUp()
Declaration
public void SetUp()
TearDown()
Declaration
public void TearDown()
Validate_RejectsEmptyId()
Declaration
public void Validate_RejectsEmptyId()
Validate_RejectsNonPositiveFloatIncrement()
Declaration
public void Validate_RejectsNonPositiveFloatIncrement()
Validate_WarnsWhenNoThemeAssigned()
Declaration
public void Validate_WarnsWhenNoThemeAssigned()