logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityCharacterPoolServiceTests

    PlayMode tests for Serenity.Character.Infrastructure.Services.UnityCharacterPoolService, the MonoBehaviour pool. A real prefab (GameObject with an IViewBase component) is supplied so the full spawn / release / reuse path can run. Bind delegates are simple counting lambdas.

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

    Constructors

    UnityCharacterPoolServiceTests()

    Declaration
    public UnityCharacterPoolServiceTests()

    Methods

    ActiveCount_Initially_IsZero()

    Declaration
    public void ActiveCount_Initially_IsZero()

    Implements_ICharacterSpawnService()

    Declaration
    public void Implements_ICharacterSpawnService()

    Initialize_NullBind_Throws()

    Declaration
    public void Initialize_NullBind_Throws()

    Initialize_NullRebind_Throws()

    Declaration
    public void Initialize_NullRebind_Throws()

    Initialize_NullUnbind_Throws()

    Declaration
    public void Initialize_NullUnbind_Throws()

    ReleaseAll_ClearsActiveCount()

    Declaration
    public void ReleaseAll_ClearsActiveCount()

    ReleaseAll_Empty_DoesNotThrow()

    Declaration
    public void ReleaseAll_Empty_DoesNotThrow()

    Release_InvalidId_DoesNothing()

    Declaration
    public void Release_InvalidId_DoesNothing()

    Release_UnknownId_DoesNothing()

    Declaration
    public void Release_UnknownId_DoesNothing()

    SetUp()

    Declaration
    public void SetUp()

    SpawnThenRelease_ReturnsToPool_AndReuseRebinds()

    Declaration
    public void SpawnThenRelease_ReturnsToPool_AndReuseRebinds()

    Spawn_AppliesPositionToInstance()

    Declaration
    public void Spawn_AppliesPositionToInstance()

    Spawn_BindFails_LogsErrorAndReturnsDefault()

    Declaration
    public void Spawn_BindFails_LogsErrorAndReturnsDefault()

    Spawn_NullPrefab_LogsErrorAndReturnsDefault()

    Declaration
    public void Spawn_NullPrefab_LogsErrorAndReturnsDefault()

    Spawn_Registered_CreatesInstanceAndReturnsValidId()

    Declaration
    public void Spawn_Registered_CreatesInstanceAndReturnsValidId()

    Spawn_UnregisteredKey_LogsErrorAndReturnsDefault()

    Declaration
    public void Spawn_UnregisteredKey_LogsErrorAndReturnsDefault()

    TearDown()

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