logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class MenuServiceSettingsCreatorTests

    EditMode tests for MenuServiceSettingsCreator: field validation and, in a temporary folder, actual settings asset creation — including the create-vs-update singleton contract. Every fixture uses an explicit Serenity.Menu.Tests.Editor.MenuServiceSettingsCreatorTests.TempFolder and either an explicit new-asset path or an explicit MenuServiceSettingsCreator.Input.ExistingSettingsAssetPath: Create(Input) never scans the project for the singleton (only CreateMenuServiceSettingsWindow.PreselectExistingSingleton does, via ResolveSettingsContext(string, string)), so these tests stay hermetic even though the package ships its own real singleton at Assets/Serenity/Media/Menu/MenuServiceSettings.asset — that asset is never touched here. Mirrors Serenity.Audio.SoundMixerSettings.Tests.Editor.SoundMixerSettingsCreatorTests.

    Inheritance
    object
    MenuServiceSettingsCreatorTests
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Menu.Tests.Editor
    Assembly: Serenity.Menu.Tests.Editor.dll
    Syntax
    public class MenuServiceSettingsCreatorTests

    Constructors

    MenuServiceSettingsCreatorTests()

    Declaration
    public MenuServiceSettingsCreatorTests()

    Methods

    ApplyFields_EveryAssetFieldHasALikeNamedInputFieldOrIsExplicitlyExcluded()

    Declaration
    public void ApplyFields_EveryAssetFieldHasALikeNamedInputFieldOrIsExplicitlyExcluded()

    CreateFromDraft_Existing_CopiesEveryFieldOntoTheRealAssetAndPreservesGuid()

    Declaration
    public void CreateFromDraft_Existing_CopiesEveryFieldOntoTheRealAssetAndPreservesGuid()

    CreateFromDraft_NoExisting_CreatesAtTheGivenPath()

    Declaration
    public void CreateFromDraft_NoExisting_CreatesAtTheGivenPath()

    Create_AssignsAGuid()

    Declaration
    public void Create_AssignsAGuid()

    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 SoundMixerSettingsCreatorTests' identical regression test.

    Declaration
    public void Create_FailureRollsBack()

    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_WritesControllerIdAndBorderMargin()

    Declaration
    public void Create_WritesControllerIdAndBorderMargin()

    Input_DefaultExistingSettingsAssetPath_IsEmpty()

    Drift guard for Create(Input)'s write-mode selection: a default, otherwise-untouched MenuServiceSettingsCreator.Input must select CreateNew, never UpdateExisting — a non-empty default on ExistingSettingsAssetPath would silently repoint every caller that forgets to clear it at an update.

    Declaration
    public void Input_DefaultExistingSettingsAssetPath_IsEmpty()

    OneTimeTearDown()

    Declaration
    public void OneTimeTearDown()

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

    Declaration
    public void TearDown()

    Validate_RejectsEmptyControllerId()

    Declaration
    public void Validate_RejectsEmptyControllerId()

    Validate_RejectsEmptyId()

    Declaration
    public void Validate_RejectsEmptyId()

    Validate_RejectsFolderOutsideAssets()

    Declaration
    public void Validate_RejectsFolderOutsideAssets()
    In this article
    © 2026 Serenity. All Rights Reserved