logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class TestableModalService

    Opens UnityModalService's protected close-modal handler to UnityModalServiceTests, which is the only way to exercise it without a live event dispatcher and a real modal prefab. Lives in its own file because Unity binds a MonoBehaviour script by file name; nothing else may use it.

    Inheritance
    object
    TestableModalService
    Namespace: Serenity.UnityModal.Tests.Infrastructure
    Assembly: Tests.dll
    Syntax
    public class TestableModalService : UnityModalService

    Constructors

    TestableModalService()

    Declaration
    public TestableModalService()

    Methods

    PlaceOpenModal(IUiModal)

    Puts a modal in the "currently open" slot, which production code only reaches by building a real one from a theme's prefab templates.

    Declaration
    public void PlaceOpenModal(IUiModal modal)
    Parameters
    Type Name Description
    IUiModal modal

    RaiseCloseModal()

    Invokes the close-modal handler exactly as the event dispatcher would.

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