logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.UnityCutscenePlayer.Tests.Infrastructure

    Classes

    UnityCutsceneDefinitionTests

    Tests for the Serenity.CutscenePlayer.Infrastructure.Settings.UnityCutsceneDefinition ScriptableObject. The asset is created with UnityEngine.ScriptableObject.CreateInstance``1 (never new) and the assertions cover the public Stages list, the Serenity.Global.Domain.Interfaces.IFoundationSettings Id/Guid accessors and the explicit Serenity.SequencePlayer.Application.Interfaces.ISequenceDefinition.Stages cast.

    UnityCutscenePlayerServiceFactoryTests

    Tests for Serenity.CutscenePlayer.Infrastructure.Services.UnityCutscenePlayerServiceFactory. The factory is exercised end-to-end: each overload creates a real Serenity.CutscenePlayer.Infrastructure.Services.UnityCutscenePlayerService MonoBehaviour on a fresh GameObject (via AddComponent) and the assertions confirm the service contract is produced and definitions are wired through. The no-definition/unsupported paths only emit warnings (not errors) via the injected FakeLogService, so no LogAssert is needed. Every created service GameObject is destroyed in teardown. Playback (PlayAsync / timelines) is out of scope here — that lives in the service itself and requires live Playables.

    UnityCutscenePlayerSettingsTests

    Tests for the Serenity.CutscenePlayer.Infrastructure.Settings.UnityCutscenePlayerSettings ScriptableObject, focused on the explicit Serenity.SequencePlayer.Application.Interfaces.ISequencePlayerSettings.DefinitionIds projection, which must filter out null/whitespace ids. Assets are created with UnityEngine.ScriptableObject.CreateInstance``1.

    UnityCutsceneStepTests

    Tests for Serenity.CutscenePlayer.Infrastructure.Settings.UnityCutsceneStep, the serializable cutscene stage entity. The class exposes its data only through read-only properties backed by private [SerializeField] fields, so the populated cases use UnityEngine.JsonUtility.FromJson``1(System.String) (the real Unity serialization path) to drive the fields rather than reflection. The key behaviour under test is the explicit Serenity.SequencePlayer.Application.Interfaces.ISequenceStage.StageType mapping that bridges the cutscene-specific enum onto the generic sequence enum.

    In this article
    © 2026 Serenity. All Rights Reserved