logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class FixtureOwnedFolders

    A fixture's hold on folders outside its own private Assets/Fixture root. For each folder it records the topmost folder on that path which did not exist yet, so Release() removes what the fixture created and nothing the project already held.

    That distinction is the whole point. A project copy lands under the REAL Assets/Game/Media whatever folder the test ran in, and a customer project — like a persistent CI workspace — already keeps its own content under Assets/Game. A cleanup that removes the user-content root only "when the fixture created it" therefore passes on a pristine checkout and leaks everything below that root the moment it was already there.

    Inheritance
    object
    FixtureOwnedFolders
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Tests.Shared.Editor
    Assembly: Serenity.Tests.Shared.Editor.dll
    Syntax
    public sealed class FixtureOwnedFolders

    Methods

    Claim(params string[])

    Records the folders folderPaths will need created, without creating anything — for folders only this fixture writes into, such as the one its project copies land in. Release() deletes each chain it created together with everything inside it.

    Declaration
    public static FixtureOwnedFolders Claim(params string[] folderPaths)
    Parameters
    Type Name Description
    string[] folderPaths
    Returns
    Type Description
    FixtureOwnedFolders

    Release()

    Removes the folders this instance recorded as created — see Claim(params string[]) and SeedExistingUserContentRoot() for what each keeps.

    Declaration
    public void Release()

    SeedExistingUserContentRoot()

    Stands a customer-shaped project up around a fixture: makes sure Serenity.Tests.Shared.Editor.FixtureOwnedFolders.ExistingUserContentFolder exists, the shape every real project is in. A fixture that writes under Serenity.Global.Infrastructure.Editor.SerenityUserContentPaths.GameRoot seeds this in its OneTimeSetUp, so a cleanup that only works on a pristine checkout leaks here, locally, where the residue guards report it. Release() removes the seeded folders only while they are empty — anything a fixture left inside them stays for those guards to see.

    Declaration
    public static FixtureOwnedFolders SeedExistingUserContentRoot()
    Returns
    Type Description
    FixtureOwnedFolders
    In this article
    © 2026 Serenity. All Rights Reserved