logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityWizardTargetAssetTests

    Tests for Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset's get-or-create decision state: mode derivation, ambiguity, the user-pick override, change tracking, and the package-content confirmation gate. Editor-only, and built on real assets on disk for the package-content case — the contract there is about a real shipped asset's path, which no in-memory double can stand in for. Mirrors the temp-folder SetUp/TearDown pattern of SerenityDefaultAssetFolderTests.

    Inheritance
    object
    SerenityWizardTargetAssetTests
    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 SerenityWizardTargetAssetTests

    Constructors

    SerenityWizardTargetAssetTests()

    Declaration
    public SerenityWizardTargetAssetTests()

    Methods

    ConsumeSeedRequest_FirstResolution_ReturnsTrueOnceThenFalse()

    Declaration
    public void ConsumeSeedRequest_FirstResolution_ReturnsTrueOnceThenFalse()

    ConsumeSeedRequest_Null_ReturnsFalseAndDoesNotClearTheRecord()

    Declaration
    public void ConsumeSeedRequest_Null_ReturnsFalseAndDoesNotClearTheRecord()

    ConsumeSeedRequest_RetargetBackToTheFirstAsset_ReturnsTrueAgainBecauseTheRecordedPathChanged()

    Documents a real, intentional consequence of the guard remembering only the LAST seeded path, not a full history of every asset a run has ever visited: bouncing A → B → A reseeds A a second time, because B's path is what is on record when the target returns to A. The guard exists to collapse repeated reprocessing of the SAME immediate resolution (e.g. a target flickering through CreateNew mid-edit), not to remember every asset ever seen.

    Declaration
    public void ConsumeSeedRequest_RetargetBackToTheFirstAsset_ReturnsTrueAgainBecauseTheRecordedPathChanged()

    ConsumeSeedRequest_RetargetToADifferentAsset_ReturnsTrueAgain()

    Declaration
    public void ConsumeSeedRequest_RetargetToADifferentAsset_ReturnsTrueAgain()

    ConsumeTargetChanged_TrueOnceThenFalse_AndFalseAgainAfterRefreshReturningTheSameAsset()

    Declaration
    public void ConsumeTargetChanged_TrueOnceThenFalse_AndFalseAgainAfterRefreshReturningTheSameAsset()

    DescribeTargetLine_ForAmbiguous_ReturnsTheAmbiguousLine()

    Declaration
    public void DescribeTargetLine_ForAmbiguous_ReturnsTheAmbiguousLine()

    DescribeTargetLine_ForCreateNewWithAnExistingFolder_NamesTheFolderAsAlreadyExisting()

    Declaration
    public void DescribeTargetLine_ForCreateNewWithAnExistingFolder_NamesTheFolderAsAlreadyExisting()

    DescribeTargetLine_ForMoveOutOfPackage_NamesThePlannedPathAsAMoveAndUpdate()

    Declaration
    public void DescribeTargetLine_ForMoveOutOfPackage_NamesThePlannedPathAsAMoveAndUpdate()

    DescribeTargetLine_ForUpdateInPlace_NamesTheExistingAssetPath()

    Declaration
    public void DescribeTargetLine_ForUpdateInPlace_NamesTheExistingAssetPath()

    MovesOutOfPackage_ReturnsMoveOutOfPackageAndWritesToOutputFolder()

    Declaration
    public void MovesOutOfPackage_ReturnsMoveOutOfPackageAndWritesToOutputFolder()

    OneTimeSetUp()

    Declaration
    public void OneTimeSetUp()

    OneTimeTearDown()

    Declaration
    public void OneTimeTearDown()

    Pick_AfterAmbiguity_ReturnsUpdateInPlaceAndClearsAmbiguity()

    Declaration
    public void Pick_AfterAmbiguity_ReturnsUpdateInPlaceAndClearsAmbiguity()

    Pick_Null_ReturnsCreateNew()

    Declaration
    public void Pick_Null_ReturnsCreateNew()

    PlannedAssetPath_ForCreateNewWithEmptyFolder_UsesDefaultFolderAndSanitizedName()

    Declaration
    public void PlannedAssetPath_ForCreateNewWithEmptyFolder_UsesDefaultFolderAndSanitizedName()

    PlannedAssetPath_ForUpdateInPlace_ReturnsTheExistingAssetPathRegardlessOfFolder()

    Declaration
    public void PlannedAssetPath_ForUpdateInPlace_ReturnsTheExistingAssetPathRegardlessOfFolder()

    PlannedTargetPath_ForCreateNew_JoinsFolderAndFileName()

    Declaration
    public void PlannedTargetPath_ForCreateNew_JoinsFolderAndFileName()

    PlannedTargetPath_MoveOutOfPackage_KeepsTheExistingFileName()

    A move is a GUID-preserving relocation, not a rename: the shipped asset's own file name must survive regardless of what assetFileName-shaped argument the caller passes in (here, deliberately different from the shipped asset's real file name), because Serenity.Global.Infrastructure.Editor.SerenityPackageContentRelocator.MoveIntoFolder(System.String,System.String,Serenity.Global.Infrastructure.Editor.SerenityAssetCreationTransaction) keeps the source file name unconditionally — a planned path computed any other way would disagree with what the relocator actually produces.

    Declaration
    public void PlannedTargetPath_MoveOutOfPackage_KeepsTheExistingFileName()

    Refresh_AmbiguousPaths_ReturnsAmbiguousWithBlockingError()

    Declaration
    public void Refresh_AmbiguousPaths_ReturnsAmbiguousWithBlockingError()

    Refresh_NullAndNoAmbiguity_ReturnsCreateNew()

    Declaration
    public void Refresh_NullAndNoAmbiguity_ReturnsCreateNew()

    Refresh_OneUserContentAsset_ReturnsUpdateInPlace()

    Declaration
    public void Refresh_OneUserContentAsset_ReturnsUpdateInPlace()

    Refresh_PackageContentAsset_IsUpdatePackageContentUntilConfirmed()

    Declaration
    public void Refresh_PackageContentAsset_IsUpdatePackageContentUntilConfirmed()

    Retarget_AfterPick_ReResolvesInsteadOfStayingLatched()

    Declaration
    public void Retarget_AfterPick_ReResolvesInsteadOfStayingLatched()

    Retarget_NullAfterAnAsset_FlagsAChangeAndYieldsCreateNew()

    Declaration
    public void Retarget_NullAfterAnAsset_FlagsAChangeAndYieldsCreateNew()

    Retarget_SameAssetAsBefore_DoesNotFlagAChange()

    Declaration
    public void Retarget_SameAssetAsBefore_DoesNotFlagAChange()

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

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