logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class BatchSoundEffectImporterTests

    EditMode tests for BatchSoundEffectImporter: filename inference, path generation, duplicate detection, validation rules and (in a temporary folder) actual asset creation.

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

    Constructors

    BatchSoundEffectImporterTests()

    Declaration
    public BatchSoundEffectImporterTests()

    Methods

    BuildAssetPath_CombinesFolderAndSafeName()

    Declaration
    public void BuildAssetPath_CombinesFolderAndSafeName()

    Create_MakeUniqueNames_DoesNotOverwriteExistingAsset()

    Declaration
    public void Create_MakeUniqueNames_DoesNotOverwriteExistingAsset()

    Create_MakeUniqueNames_IdCollisionWithExistingAsset_AutoSuffixesIdInsteadOfBlocking()

    Regression test: "Make unique names (never overwrite)" used to only dedupe the destination asset PATH — a colliding runtime Id was always a hard validation error regardless of the toggle, contradicting its own "never overwrite" tooltip. With the fix, a colliding id is auto-suffixed (_1, _2, …) instead of blocking Create.

    Declaration
    public void Create_MakeUniqueNames_IdCollisionWithExistingAsset_AutoSuffixesIdInsteadOfBlocking()

    Create_RegisterInRuntimeList_RegistersCreatedAssetInTheRuntimeSelectableList()

    Regression test: a batch-created clip was only ever registered in Audio_SoundToTrigger one at a time via the created asset's own Inspector "Fix (register)" button — Create() never called the registration fix that already existed for exactly this purpose. Mutates the project's real registry (the same way the sibling Addressables test above mutates the real Addressables settings), so the appended entry is surgically removed again in finally.

    Declaration
    public void Create_RegisterInRuntimeList_RegistersCreatedAssetInTheRuntimeSelectableList()

    Create_RegistersCreatedDefinitionsAsAddressables()

    Declaration
    public void Create_RegistersCreatedDefinitionsAsAddressables()

    Create_WritesOneAssetPerItem_WithConfiguredFields()

    Declaration
    public void Create_WritesOneAssetPerItem_WithConfiguredFields()

    FindDuplicateAssetNames_DetectsRepeats()

    Declaration
    public void FindDuplicateAssetNames_DetectsRepeats()

    FindDuplicateIds_DetectsRepeatsAmongIncludedItems()

    Declaration
    public void FindDuplicateIds_DetectsRepeatsAmongIncludedItems()

    IsAudioFile_RecognisesKnownExtensions_IgnoringCase()

    Declaration
    public void IsAudioFile_RecognisesKnownExtensions_IgnoringCase()

    SetUp()

    Declaration
    public void SetUp()

    SuggestAssetName_UsesFileNameWithoutExtension()

    Declaration
    public void SuggestAssetName_UsesFileNameWithoutExtension()

    SuggestId_SanitisesAndLowercases()

    Declaration
    public void SuggestId_SanitisesAndLowercases()

    TearDown()

    Declaration
    public void TearDown()

    ValidateItem_RejectsMissingClipAndBadId()

    Declaration
    public void ValidateItem_RejectsMissingClipAndBadId()

    Validate_FlagsDuplicateAndExistingIds()

    Declaration
    public void Validate_FlagsDuplicateAndExistingIds()

    Validate_RejectsInvalidFolderAndEmptyBatch()

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