logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class InstallTaskAuthoringTests

    EditMode tests for Serenity.Global.Infrastructure.Editor.InitializationPipeline.InstallTaskAuthoring: task asset creation, profile insertion/removal and duplicate-task detection. Every mutation happens against a temp folder and scratch UnityInitializationPipelineProfile assets created via ScriptableObject.CreateInstance — the project's real profile assets are never touched. Mirrors the temp-folder SetUp/TearDown pattern of AsmdefReferenceWriterTests and GameSaveCreatorTests.

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

    Constructors

    InstallTaskAuthoringTests()

    Declaration
    public InstallTaskAuthoringTests()

    Methods

    AnyProfileContainsInstallTask_WiredInAProjectOwnedProfile_ReturnsTrue()

    Declaration
    public void AnyProfileContainsInstallTask_WiredInAProjectOwnedProfile_ReturnsTrue()

    AnyProfileContainsInstallTask_WiredOnlyInAPackageShippedProfile_ReturnsFalse()

    Declaration
    public void AnyProfileContainsInstallTask_WiredOnlyInAPackageShippedProfile_ReturnsFalse()

    CreateInstallTaskAsset_BlankMethodName_ReturnsError()

    Declaration
    public void CreateInstallTaskAsset_BlankMethodName_ReturnsError()

    CreateInstallTaskAsset_InvalidFolder_ReturnsErrorAndCreatesNoAsset()

    Declaration
    public void CreateInstallTaskAsset_InvalidFolder_ReturnsErrorAndCreatesNoAsset()

    CreateInstallTaskAsset_ValidInput_CreatesAssetWithExpectedFields()

    Declaration
    public void CreateInstallTaskAsset_ValidInput_CreatesAssetWithExpectedFields()

    FindExistingInstallTask_ForeignTypeName_IsIgnored()

    Declaration
    public void FindExistingInstallTask_ForeignTypeName_IsIgnored()

    FindExistingInstallTask_MatchingTaskExists_ReturnsItWithItsPath()

    Declaration
    public void FindExistingInstallTask_MatchingTaskExists_ReturnsItWithItsPath()

    FindExistingInstallTask_MultipleMatches_ReturnsOrdinalFirstAndReportsAllPaths()

    Declaration
    public void FindExistingInstallTask_MultipleMatches_ReturnsOrdinalFirstAndReportsAllPaths()

    FindExistingInstallTask_NoMatch_ReturnsNullWithEmptyAllPaths()

    Declaration
    public void FindExistingInstallTask_NoMatch_ReturnsNullWithEmptyAllPaths()

    FindExistingInstallTask_ProjectOwnedSortsAfterAShippedSignatureMatch_ProjectOwnedWins()

    A project-owned task must win over a package-shipped one with the same signature even when its own path sorts AFTER the shipped one ordinally — the ordinal-first pick this method used to make would return the shipped match here, which is exactly the bug: it only ever picked the project-owned match by the accident of Assets/Game sorting before Assets/Serenity in the real project.

    Declaration
    public void FindExistingInstallTask_ProjectOwnedSortsAfterAShippedSignatureMatch_ProjectOwnedWins()

    FindProjectOwnedProfiles_ExcludesPackageShippedProfiles()

    The project's own real shipped profiles live under Assets/Serenity — Serenity.Global.Infrastructure.Editor.SerenityEditorPaths.AssetsRoot, one of the two Serenity.Global.Infrastructure.Editor.SerenityEditorPaths.PackageRoots entries — so this exercises the exclusion against real content instead of a fabricated path.

    Declaration
    public void FindProjectOwnedProfiles_ExcludesPackageShippedProfiles()

    FindProjectOwnedProfiles_IncludesAScratchProfileOutsideThePackageRoots()

    Serenity.Global.Infrastructure.Tests.Editor.InitializationPipeline.InstallTaskAuthoringTests.TempFolder lives outside every Serenity.Global.Infrastructure.Editor.SerenityEditorPaths.PackageRoots entry, so a profile created under it is project-owned. SerenityEditorPathsTests and AddressablesOwnershipLabelsTests already pin the underlying path predicate for both PackageRoots entries at the string level — this only needs to prove Serenity.Global.Infrastructure.Editor.InitializationPipeline.InstallTaskAuthoring.FindProjectOwnedProfiles actually delegates to it.

    Declaration
    public void FindProjectOwnedProfiles_IncludesAScratchProfileOutsideThePackageRoots()

    FindThenInsert_ExistingTaskIsReused_NoNewAssetIsCreated()

    Declaration
    public void FindThenInsert_ExistingTaskIsReused_NoNewAssetIsCreated()

    IndexOfInstallTask_MatchPresent_ReturnsItsPosition()

    Declaration
    public void IndexOfInstallTask_MatchPresent_ReturnsItsPosition()

    IndexOfInstallTask_NoMatch_ReturnsMinusOne()

    Declaration
    public void IndexOfInstallTask_NoMatch_ReturnsMinusOne()

    IndexOfInstallTask_NullProfileOrBlankMethod_ReturnsMinusOne()

    Declaration
    public void IndexOfInstallTask_NullProfileOrBlankMethod_ReturnsMinusOne()

    InsertTaskIntoProfile_AtEnd_AppendsAfterExistingTasks()

    Declaration
    public void InsertTaskIntoProfile_AtEnd_AppendsAfterExistingTasks()

    InsertTaskIntoProfile_AtMiddleIndex_InsertsBetweenExistingTasks()

    Declaration
    public void InsertTaskIntoProfile_AtMiddleIndex_InsertsBetweenExistingTasks()

    InsertTaskIntoProfile_AtZero_InsertsAtTheFront()

    Declaration
    public void InsertTaskIntoProfile_AtZero_InsertsAtTheFront()

    InsertTaskIntoProfile_DuplicateInstance_ReturnsFalseWithWarningAndLeavesListUnchanged()

    Declaration
    public void InsertTaskIntoProfile_DuplicateInstance_ReturnsFalseWithWarningAndLeavesListUnchanged()

    InsertTaskIntoProfile_IndexBeyondCount_ClampsToEnd()

    Declaration
    public void InsertTaskIntoProfile_IndexBeyondCount_ClampsToEnd()

    InsertTaskIntoProfile_MarksProfileDirty()

    Declaration
    public void InsertTaskIntoProfile_MarksProfileDirty()

    InsertTaskIntoProfile_NegativeIndex_ClampsToFront()

    Declaration
    public void InsertTaskIntoProfile_NegativeIndex_ClampsToFront()

    IsLikelyAuthoredProfile_EmptyProfileAmongSeveral_ReturnsFalse()

    Declaration
    public void IsLikelyAuthoredProfile_EmptyProfileAmongSeveral_ReturnsFalse()

    IsLikelyAuthoredProfile_FewerTasksThanAnotherProfile_ReturnsFalse()

    Declaration
    public void IsLikelyAuthoredProfile_FewerTasksThanAnotherProfile_ReturnsFalse()

    IsLikelyAuthoredProfile_HasTheMostTasksAmongSeveral_ReturnsTrue()

    Declaration
    public void IsLikelyAuthoredProfile_HasTheMostTasksAmongSeveral_ReturnsTrue()

    IsLikelyAuthoredProfile_NullProfileOrEmptyProfileList_ReturnsFalse()

    Declaration
    public void IsLikelyAuthoredProfile_NullProfileOrEmptyProfileList_ReturnsFalse()

    IsLikelyAuthoredProfile_OnlyProfileInTheProject_ReturnsTrueEvenWhenEmpty()

    Declaration
    public void IsLikelyAuthoredProfile_OnlyProfileInTheProject_ReturnsTrueEvenWhenEmpty()

    IsLikelyAuthoredProfile_TiedTaskCounts_BothDefaultToChecked()

    A tie for the most tasks is not disambiguated — every profile tied for the max qualifies, so two equally-authored profiles both default to checked rather than the rule arbitrarily picking one.

    Declaration
    public void IsLikelyAuthoredProfile_TiedTaskCounts_BothDefaultToChecked()

    OneTimeTearDown()

    Declaration
    public void OneTimeTearDown()

    ProfileContainsInstallTask_AssemblyQualifiedTypeNameVariant_StillMatchesByPrefix()

    Declaration
    public void ProfileContainsInstallTask_AssemblyQualifiedTypeNameVariant_StillMatchesByPrefix()

    ProfileContainsInstallTask_DifferentMethodName_ReturnsFalse()

    Declaration
    public void ProfileContainsInstallTask_DifferentMethodName_ReturnsFalse()

    ProfileContainsInstallTask_DifferentTaskTypeEntirely_ReturnsFalse()

    Declaration
    public void ProfileContainsInstallTask_DifferentTaskTypeEntirely_ReturnsFalse()

    ProfileContainsInstallTask_EmptyProfile_ReturnsFalse()

    Declaration
    public void ProfileContainsInstallTask_EmptyProfile_ReturnsFalse()

    ProfileContainsInstallTask_MatchingMethodAndInstallerType_ReturnsTrue()

    Declaration
    public void ProfileContainsInstallTask_MatchingMethodAndInstallerType_ReturnsTrue()

    ProfileContainsInstallTask_NullProfile_ReturnsFalse()

    Declaration
    public void ProfileContainsInstallTask_NullProfile_ReturnsFalse()

    ProfileContainsInstallTask_StepShapedTaskWithAShippedAssetForItsMethodName_ReturnsTrue()

    The bare method-name overload now recognizes the shipped per-module-step shape too, because Serenity.Global.Infrastructure.Editor.InitializationPipeline.InstallTaskAuthoring.SignaturesForInstallerMethod(System.String) reads it straight off the real shipped Assets/Serenity/Media/Global/Tasks/InstallAchievements.asset — this fixture task is shaped exactly like that asset, but lives in the temp profile, never the shipped one.

    Declaration
    public void ProfileContainsInstallTask_StepShapedTaskWithAShippedAssetForItsMethodName_ReturnsTrue()

    ProjectOwnedProfileNamesByInstallMethodName_UnwiredMethod_ReturnsEmptyList()

    Declaration
    public void ProjectOwnedProfileNamesByInstallMethodName_UnwiredMethod_ReturnsEmptyList()

    ProjectOwnedProfileNamesByInstallMethodName_WiredMethod_NamesTheOwningProfile()

    Declaration
    public void ProjectOwnedProfileNamesByInstallMethodName_WiredMethod_NamesTheOwningProfile()

    RemoveTaskFromProfile_NullProfileOrTask_DoesNotThrow()

    Declaration
    public void RemoveTaskFromProfile_NullProfileOrTask_DoesNotThrow()

    RemoveTaskFromProfile_RemovesTheTaskAndMarksDirty()

    Declaration
    public void RemoveTaskFromProfile_RemovesTheTaskAndMarksDirty()

    ResolveDefaultInsertIndexAfter_AnchorIsLastTask_ClampsToEndOfListIndex()

    Declaration
    public void ResolveDefaultInsertIndexAfter_AnchorIsLastTask_ClampsToEndOfListIndex()

    ResolveDefaultInsertIndexAfter_BothAnchorsPresent_ReturnsAfterTheLastOne()

    Declaration
    public void ResolveDefaultInsertIndexAfter_BothAnchorsPresent_ReturnsAfterTheLastOne()

    ResolveDefaultInsertIndexAfter_NoAnchorPresent_ReturnsEndOfList()

    Declaration
    public void ResolveDefaultInsertIndexAfter_NoAnchorPresent_ReturnsEndOfList()

    ResolveDefaultInsertIndexAfter_OneAnchorPresent_ReturnsAfterIt()

    Declaration
    public void ResolveDefaultInsertIndexAfter_OneAnchorPresent_ReturnsAfterIt()

    ResolveDefaultInsertIndex_HintPresentInProfile_ReturnsThatTaskPosition()

    Declaration
    public void ResolveDefaultInsertIndex_HintPresentInProfile_ReturnsThatTaskPosition()

    ResolveDefaultInsertIndex_NoHintOrHintAbsent_ReturnsEndOfList()

    Declaration
    public void ResolveDefaultInsertIndex_NoHintOrHintAbsent_ReturnsEndOfList()

    ResolveDefaultTaskFolder_NoUserAuthoredTasks_ReturnsTheConventionFolder()

    Declaration
    public void ResolveDefaultTaskFolder_NoUserAuthoredTasks_ReturnsTheConventionFolder()

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

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