logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHittableServiceTests

    PlayMode tests for UnityHittableService. The service is a MonoBehaviour, driven via AddComponent + its public API. Verifies register/unregister/query and hit-state delegation to the Domain HittableState entities held in the internal dictionary. Signal dispatch is covered separately in UnityHittableServiceSignalTests.

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

    Constructors

    UnityHittableServiceTests()

    Declaration
    public UnityHittableServiceTests()

    Methods

    GetSnapshot_ReflectsMaxHealth()

    Declaration
    public void GetSnapshot_ReflectsMaxHealth()

    Implements_IHittableService()

    Declaration
    public void Implements_IHittableService()

    InitializeService_NullLog_DoesNotThrow()

    Declaration
    public void InitializeService_NullLog_DoesNotThrow()

    InitializeService_SetsIdAndGuid()

    Declaration
    public void InitializeService_SetsIdAndGuid()

    IsRegistered_BeforeRegister_ReturnsFalse()

    Declaration
    public void IsRegistered_BeforeRegister_ReturnsFalse()

    LogService_Property_RoundTrips()

    Declaration
    public void LogService_Property_RoundTrips()

    Register_ExistingId_ReinitializesState()

    Declaration
    public void Register_ExistingId_ReinitializesState()

    Register_ThenIsRegistered_ReturnsTrue()

    Declaration
    public void Register_ThenIsRegistered_ReturnsTrue()

    Reset_RestoresFullHealth_AndUndestroys()

    Declaration
    public void Reset_RestoresFullHealth_AndUndestroys()

    Reset_UnknownId_DoesNotThrow()

    Declaration
    public void Reset_UnknownId_DoesNotThrow()

    SetUp()

    Declaration
    public void SetUp()

    TakeHit_AfterDestroyed_ReturnsIgnored()

    Declaration
    public void TakeHit_AfterDestroyed_ReturnsIgnored()

    TakeHit_Indestructible_AlwaysReturnsDamaged_RemainingHealthIsMinusOne()

    Declaration
    public void TakeHit_Indestructible_AlwaysReturnsDamaged_RemainingHealthIsMinusOne()

    TakeHit_KillingBlow_ReturnsDestroyed()

    Declaration
    public void TakeHit_KillingBlow_ReturnsDestroyed()

    TakeHit_RegisteredHittable_ReducesHealth_ReturnsDamaged()

    Declaration
    public void TakeHit_RegisteredHittable_ReducesHealth_ReturnsDamaged()

    TakeHit_UnknownId_ReturnsIgnored_AndSnapshotIsDefault()

    Declaration
    public void TakeHit_UnknownId_ReturnsIgnored_AndSnapshotIsDefault()

    TearDown()

    Declaration
    public void TearDown()

    Unregister_KnownId_ReturnsTrueAndRemoves()

    Declaration
    public void Unregister_KnownId_ReturnsTrueAndRemoves()

    Unregister_UnknownId_ReturnsFalse()

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