logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityGameModeServiceTests

    Tests for Serenity.GameMode.Infrastructure.Services.UnityGameModeService, the MonoBehaviour that owns the Menu/Game/Pause state machine. The service is driven through AddComponent with spy ports (pause strategy, event dispatcher) and a real settings ScriptableObject. Only the synchronous, scene-free surface is exercised: mode-state transitions, the Game↔Pause flow, pause-strategy coordination and signal dispatch. Additive scene loading/unloading, input-action binding and the loading overlay run through coroutines and real scenes and are intentionally out of scope here.

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

    Constructors

    UnityGameModeServiceTests()

    Declaration
    public UnityGameModeServiceTests()

    Methods

    Implements_IGameModeService()

    Declaration
    public void Implements_IGameModeService()

    InitialState_NotPaused_NotTransitioning()

    Declaration
    public void InitialState_NotPaused_NotTransitioning()

    InitializeService_CopiesIdAndGuidFromSettings()

    Declaration
    public void InitializeService_CopiesIdAndGuidFromSettings()

    SetMode_DispatchesGameModeChangedSignalWithBothModes()

    Declaration
    public void SetMode_DispatchesGameModeChangedSignalWithBothModes()

    SetMode_ExitPauseToGame_RemovesPause()

    Declaration
    public void SetMode_ExitPauseToGame_RemovesPause()

    SetMode_Game_UpdatesCurrentAndPreviousMode()

    Declaration
    public void SetMode_Game_UpdatesCurrentAndPreviousMode()

    SetMode_Pause_AppliesPauseStrategy_WhenPauseAffectsTimeScale()

    Declaration
    public void SetMode_Pause_AppliesPauseStrategy_WhenPauseAffectsTimeScale()

    SetMode_SameMode_IsNoOp()

    Declaration
    public void SetMode_SameMode_IsNoOp()

    SetUp()

    Declaration
    public void SetUp()

    TearDown()

    Declaration
    public void TearDown()

    TogglePause_FromGame_EntersPauseAndDispatchesPauseToggled()

    Declaration
    public void TogglePause_FromGame_EntersPauseAndDispatchesPauseToggled()

    TogglePause_FromPause_ResumesGame()

    Declaration
    public void TogglePause_FromPause_ResumesGame()

    TogglePause_WhileInMenu_IsIgnored()

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