feat(items): add ChestItemData resource and RoomChestConfig static config
TDD: 4 tests written first (FAIL), then implemented — all 151 tests pass.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
## Tests for ChestItemData resource and RoomChestConfig static config.
|
||||
extends GutTest
|
||||
|
||||
|
||||
func test_chest_item_data_default_item_type_is_holdable() -> void:
|
||||
var d: ChestItemData = ChestItemData.new()
|
||||
assert_eq(d.item_type, "holdable")
|
||||
|
||||
|
||||
func test_chest_item_data_default_outfit_layer_is_one() -> void:
|
||||
var d: ChestItemData = ChestItemData.new()
|
||||
assert_eq(d.outfit_layer, 1)
|
||||
|
||||
|
||||
func test_room_chest_config_reception_desk_has_three_items() -> void:
|
||||
var items: Array[ChestItemData] = RoomChestConfig.get_items("reception_desk")
|
||||
assert_eq(items.size(), 3)
|
||||
|
||||
|
||||
func test_room_chest_config_unknown_id_returns_empty() -> void:
|
||||
var items: Array[ChestItemData] = RoomChestConfig.get_items("does_not_exist")
|
||||
assert_eq(items.size(), 0)
|
||||
Reference in New Issue
Block a user