Class InventoryAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<InventoryAssert,InventorySnapshot>
nl.pim16aap2.lightkeeper.framework.assertions.InventoryAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<InventoryAssert,,InventorySnapshot> org.assertj.core.api.Descriptable<InventoryAssert>,org.assertj.core.api.ExtensionPoints<InventoryAssert,InventorySnapshot>
public final class InventoryAssert
extends org.assertj.core.api.AbstractAssert<InventoryAssert,InventorySnapshot>
Assertions over a frozen inventory snapshot, including occupied-slot and item navigation.
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
info, throwUnsupportedExceptionOnEquals -
Method Summary
Modifier and TypeMethodDescriptionhasEmptySlot(int slot) Checks that no non-air item was observed at a slot.Checks a slot's material.hasItemAt(int slot, org.bukkit.inventory.ItemStack expected) Compares represented item fields, excluding amount and unobserved metadata.hasOccupiedSlotCount(int expected) Checks occupied slots rather than total item units.isEmpty()itemAt(int slot) Selects an occupied slot from one snapshot.org.assertj.core.api.ListAssert<MenuItemSnapshot> items()Methods inherited from class org.assertj.core.api.AbstractAssert
actual, asInstanceOf, asList, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Method Details
-
items
- Returns:
- Frozen item-list assertions; recreate navigation when retrying.
-
isEmpty
- Returns:
- This assertion after checking that no non-air items are present.
-
hasOccupiedSlotCount
Checks occupied slots rather than total item units.- Parameters:
expected- Expected nonnegative occupied-slot count.- Returns:
- This assertion.
-
itemAt
Selects an occupied slot from one snapshot.- Parameters:
slot- Nonnegative slot index.- Returns:
- Frozen item assertions.
-
hasEmptySlot
Checks that no non-air item was observed at a slot.The snapshot does not expose capacity, so an empty slot does not establish upper-bound validity.
- Parameters:
slot- Nonnegative slot index.- Returns:
- This assertion.
-
hasItemAt
Checks a slot's material.- Parameters:
slot- Nonnegative slot index.materialKey- Material name or namespaced key.- Returns:
- This assertion.
-
hasItemAt
Compares represented item fields, excluding amount and unobserved metadata.- Parameters:
slot- Nonnegative slot index.expected- Expected Bukkit item.- Returns:
- This assertion.
-