inventory #14
@@ -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));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user