logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class InventorySectionTests

    InventorySection-specific tests: add/remove/query behavior and serialize/deserialize round-trips.

    Inheritance
    object
    InventorySectionTests
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameSave.Tests.Domain
    Assembly: Tests.dll
    Syntax
    public class InventorySectionTests

    Constructors

    InventorySectionTests()

    Declaration
    public InventorySectionTests()

    Methods

    AddItem_ExistingItem_AccumulatesQuantity()

    Declaration
    public void AddItem_ExistingItem_AccumulatesQuantity()

    AddItem_NewItem_IsHeldWithGivenQuantity()

    Declaration
    public void AddItem_NewItem_IsHeldWithGivenQuantity()

    AddItem_NullOrEmptyItemId_ThrowsArgumentException()

    Declaration
    public void AddItem_NullOrEmptyItemId_ThrowsArgumentException()

    Deserialize_NullOrEmptyPayload_ResetsToEmpty()

    Declaration
    public void Deserialize_NullOrEmptyPayload_ResetsToEmpty()

    GetQuantity_UnknownItem_ReturnsZero()

    Declaration
    public void GetQuantity_UnknownItem_ReturnsZero()

    RemoveItem_PartialQuantity_ReducesRemainingQuantity()

    Declaration
    public void RemoveItem_PartialQuantity_ReducesRemainingQuantity()

    RemoveItem_QuantityReachesZero_DropsTheEntry()

    Declaration
    public void RemoveItem_QuantityReachesZero_DropsTheEntry()

    RemoveItem_UnknownItem_IsNoOp()

    Declaration
    public void RemoveItem_UnknownItem_IsNoOp()

    Serialize_ThenDeserialize_RoundTripsEveryEntry()

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