Namespace Serenity.UnityCutscenePlayer.Tests.Infrastructure
Classes
CutsceneDialogPresenterTests
The presenter shows a dialog line for the length of a wait it is handed and hides it afterwards whatever ended the wait. The wait here is a fake the test completes by hand, so nothing depends on wall time.
UiServiceStub
A UI service that knows one thing, the active theme, and answers every other call with the default value: enough for the code under test that only asks which theme is active.
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.
UnityCutsceneDialogPanelBuilderTests
The dialog box built in code sits at the bottom of the overlay, fits any width up to a cap, keeps that width when the overlay is resized, blocks no pointer and takes only the font from the UI theme; with no font at all it is not built.
UnityCutsceneDialogPanelTests
The dialog panel view writes a speaker and a line into two labels. It is reused across the dialogs of a play, so each test that binds twice proves the second dialog does not inherit the first one's state.
UnityCutscenePlayerServiceDialogPanelPrefabTests
One rule decides which dialog panel prefab the player holds: a prefab wired in explicitly replaces it, the prefab found in the labelled settings only fills an empty slot, and settings without one erase nothing.
UnityCutscenePlayerServiceDialogStageTests
A Show Dialog stage plays on a real cutscene player: it shows its speaker and line for its duration, then hides them and lets the next stage run. These tests run on real time with short stages.
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.
UnityCutscenePlayerServiceOverlayTests
The overlay the player draws a cutscene on scales with the screen from a fixed reference height, and its fade still covers the whole screen at that scale.
UnityCutscenePlayerServiceUnplayedStageTests
A cutscene authored before the Cutscene Wizard stopped offering it can still hold a Custom stage. The player has no way to run one, so it says so when it reaches it instead of skipping it without a word.
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
Kind mapping that bridges the cutscene-specific enum
onto the generic sequence port as its own name.