Namespace Serenity.UnityCutscenePlayer.Tests.Infrastructure
Classes
UnityCutsceneDefinitionTests
Tests for the UnityCutsceneDefinition ScriptableObject. The asset is
created with UnityEngine.ScriptableObject.CreateInstance``1 (never new) and
the assertions cover the public Stages list, the IFoundationSettings
Id/Guid accessors and the explicit Stages cast.
UnityCutscenePlayerServiceFactoryTests
Tests for UnityCutscenePlayerServiceFactory. The factory is exercised
end-to-end: each overload creates a real 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 UnityCutscenePlayerSettings ScriptableObject, focused on the explicit DefinitionIds projection, which must filter out null/whitespace ids. Assets are created with UnityEngine.ScriptableObject.CreateInstance``1.
UnityCutsceneStepTests
Tests for 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
StageType mapping that bridges the cutscene-specific
enum onto the generic sequence enum.