Class FakeInventory

java.lang.Object
com.valhalla.sdk.testing.FakeInventory

public final class FakeInventory extends Object
Mutable offline inventory fixture for script decision tests.
  • Constructor Details

    • FakeInventory

      public FakeInventory()
  • Method Details

    • setItems

      public FakeInventory setItems(Collection<Item> values)
      Replaces the fixture contents with immutable item snapshots.
    • add

      public FakeInventory add(Item item)
      Adds one immutable item snapshot.
    • all

      public List<Item> all()
      Returns the fixture items in slot order.
    • contains

      public boolean contains(int id)
      Tests whether an item identifier is present.
    • count

      public int count(int id)
      Counts the total amount for one item identifier.
    • isEmpty

      public boolean isEmpty()
      Returns whether the fixture contains no occupied slots.