logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityAssetCreationTransactionTests

    EditMode tests for Serenity.Global.Infrastructure.Editor.SerenityAssetCreationTransaction. Follows the temp-folder hygiene convention of UnityEditorUtilsTests: every fixture asset lives under a private temp folder that is wiped in TearDown(), and any Addressables entry a test registers is removed explicitly (in a finally or in TearDown()) per the project rule that tests must not pollute the real Addressables settings. The ordering Rollback gives a registered Serenity.Global.Infrastructure.Editor.SerenityExistingAssetRestore is tested here too, since Rollback is what owns it — SerenityExistingAssetRestoreTests covers the capture itself.

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

    Constructors

    SerenityAssetCreationTransactionTests()

    Declaration
    public SerenityAssetCreationTransactionTests()

    Methods

    Commit_DeletesTheParkedAsset()

    Declaration
    public void Commit_DeletesTheParkedAsset()

    Commit_DropsRestoresWithoutReplaying()

    Declaration
    public void Commit_DropsRestoresWithoutReplaying()

    Commit_EveryPathTrackedWithoutOwnLabels_AllShareTheRunWideLabel()

    Declaration
    public void Commit_EveryPathTrackedWithoutOwnLabels_AllShareTheRunWideLabel()

    Commit_NoCreatedAssets_RegisterTrueIsANoOp()

    Declaration
    public void Commit_NoCreatedAssets_RegisterTrueIsANoOp()

    Commit_PathTrackedWithItsOwnLabels_GetsThoseInsteadOfTheRunWideOnes()

    Declaration
    public void Commit_PathTrackedWithItsOwnLabels_GetsThoseInsteadOfTheRunWideOnes()

    Commit_RefreshAssetDatabaseFalse_LeavesAFileWrittenDirectlyToDiskInvisible()

    Only UnityEditor.AssetDatabase.Refresh notices a file written straight to disk instead of through the AssetDatabase API — the same reason SerenityAssetCreationTransaction.Commit(bool, IReadOnlyList<string>, bool) exists at all. Written before Begin so the transaction commits nothing new itself.

    Declaration
    public void Commit_RefreshAssetDatabaseFalse_LeavesAFileWrittenDirectlyToDiskInvisible()

    Commit_RegisterFalse_PersistsAssetWithoutRegisteringAddressables()

    Declaration
    public void Commit_RegisterFalse_PersistsAssetWithoutRegisteringAddressables()

    Commit_RegisterTrue_RegistersEveryCreatedPathWithExtraLabels()

    Declaration
    public void Commit_RegisterTrue_RegistersEveryCreatedPathWithExtraLabels()

    Commit_TwoArgumentOverload_StillRefreshesAndPicksUpAFileWrittenDirectlyToDisk()

    The two-argument overload's default behavior is unchanged: it still refreshes, so it picks up a file written directly to disk without a separate explicit refresh.

    Declaration
    public void Commit_TwoArgumentOverload_StillRefreshesAndPicksUpAFileWrittenDirectlyToDisk()

    Commit_WithoutRegistration_StillReaddressesMovedEntries()

    Declaration
    public void Commit_WithoutRegistration_StillReaddressesMovedEntries()

    Dispose_AfterCommit_LeavesTheCommittedAssetInPlace()

    Declaration
    public void Dispose_AfterCommit_LeavesTheCommittedAssetInPlace()

    Dispose_AfterExplicitRollback_DoesNotThrowOrDoubleDelete()

    Declaration
    public void Dispose_AfterExplicitRollback_DoesNotThrowOrDoubleDelete()

    Dispose_CommitNeverCalled_RollsBack()

    Declaration
    public void Dispose_CommitNeverCalled_RollsBack()

    FolderTracking_PassedToEnsureFolder_TracksNewlyCreatedSegments()

    Declaration
    public void FolderTracking_PassedToEnsureFolder_TracksNewlyCreatedSegments()

    LastCreatedPath_AfterTrackingSeveralAssets_ReturnsTheMostRecentOne()

    Declaration
    public void LastCreatedPath_AfterTrackingSeveralAssets_ReturnsTheMostRecentOne()

    LastCreatedPath_NothingTrackedYet_IsNullRatherThanThrowing()

    Declaration
    public void LastCreatedPath_NothingTrackedYet_IsNullRatherThanThrowing()

    OneTimeSetUp()

    Declaration
    public void OneTimeSetUp()

    OneTimeTearDown()

    Declaration
    public void OneTimeTearDown()

    Rollback_CalledTwice_SecondCallIsANoOp()

    Declaration
    public void Rollback_CalledTwice_SecondCallIsANoOp()

    Rollback_DeletesEveryTrackedCreatedAsset()

    Declaration
    public void Rollback_DeletesEveryTrackedCreatedAsset()

    Rollback_DeletesTrackedFoldersBottomUp()

    Declaration
    public void Rollback_DeletesTrackedFoldersBottomUp()

    Rollback_InverseMovesBeforeDeletingCreatedAssets()

    Declaration
    public void Rollback_InverseMovesBeforeDeletingCreatedAssets()

    Rollback_MovesTheParkedAssetBackAfterDeletingWhatTookItsPath()

    Declaration
    public void Rollback_MovesTheParkedAssetBackAfterDeletingWhatTookItsPath()

    Rollback_NothingTracked_IsANoOp()

    Declaration
    public void Rollback_NothingTracked_IsANoOp()

    Rollback_RemovesAddressablesEntriesRegisteredForTrackedPaths()

    Declaration
    public void Rollback_RemovesAddressablesEntriesRegisteredForTrackedPaths()

    Rollback_ReplaysRestoresLastRegisteredFirst()

    Declaration
    public void Rollback_ReplaysRestoresLastRegisteredFirst()

    Rollback_RestoreWhoseDirtyTargetWasDeleted_LogsAndContinues()

    A destroyed dirtyTarget is the throwing shape of a restore: a destroyed target is a documented no-op, so the only way one fails is the SetDirty at the end of it.

    Declaration
    public void Rollback_RestoreWhoseDirtyTargetWasDeleted_LogsAndContinues()

    Rollback_RestoresExistingAssetBeforeDeletingCreatedAssetItReferences()

    Declaration
    public void Rollback_RestoresExistingAssetBeforeDeletingCreatedAssetItReferences()

    Rollback_SuppressesSafeDeleteScope()

    Declaration
    public void Rollback_SuppressesSafeDeleteScope()

    Rollback_Twice_ReplaysRestoresOnce()

    Declaration
    public void Rollback_Twice_ReplaysRestoresOnce()

    Rollback_WithNoParkedAsset_IsANoOp()

    Declaration
    public void Rollback_WithNoParkedAsset_IsANoOp()

    Rollback_WithRestoresAndMovedAssets_RestoresBeforeInverseMoving()

    Declaration
    public void Rollback_WithRestoresAndMovedAssets_RestoresBeforeInverseMoving()

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

    Declaration
    public void TearDown()

    TrackCreatedAsset_AppendsToCreatedPathsInOrder()

    Declaration
    public void TrackCreatedAsset_AppendsToCreatedPathsInOrder()

    TrackExistingAsset_NullRestore_Throws()

    Declaration
    public void TrackExistingAsset_NullRestore_Throws()

    TrackMovedAsset_Commit_ReaddressesTheMovedEntry()

    Declaration
    public void TrackMovedAsset_Commit_ReaddressesTheMovedEntry()

    TrackMovedAsset_Rollback_MovesTheAssetBackAndKeepsItsGuid()

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