inventory #14

Merged
erns6604 merged 11 commits from inventory into main 2025-10-29 14:21:29 +01:00
Showing only changes of commit 042a08de73 - Show all commits

View File

@@ -34,4 +34,14 @@ public class InventoryTest {
));
}
@Test
void item_can_not_be_added_if_it_exeeds_weight_limit() {
var capacity = new InventoryCapacity(5);
var inventory = new Inventory(capacity);
var item = new BasicItem("iron_sword", "Iron Sword", 10);
var stack = new ItemStack(item, 1);
inventory.addItem(stack);
assertThat(inventory.getItems().size(), is(0));
}
}