-
Notifications
You must be signed in to change notification settings - Fork 9
Test Plan For CompanionInventoryComponent
The CompanionInventoryComponent
class is responsible for managing the inventory of a companion in the game. This test plan will cover various aspects of the component, including initialization, inventory management, attack cooldown, and equipped slots.
1.Initialisation Testing:
Check getItem()
, getAmmo()
, and getMaxAmmo()
return expected values.
Set attack cooldown, validate with getAttackCooldown()
.
2.Ammo Management Testing:
Increase and decrease ammo with changeAmmo()
.
Ensure ammo remains within the valid range.
3.Attack Cooldown Testing:
Decrease cooldown with decCoolDown()
.
Ensure it does not go below zero.
4.Slot and Equipped Testing:
Set and validate equipped slot with setEquipped()
and getEquipped()
.
5.Update and Ammo Testing:
Verify update()
decreases equipped weapon's cooldown.
Ensure getEquippedType()
and getCurrentAmmo()
update correctly after calling update()
.
Set the attack cooldown to 3 using setAttackCooldown(3)
and validate it with getAttackCooldown()
.
Attempt to set ammo to exceed the max ammo
, and ensure it remains within the valid range.
Confirm that attempting to exceed max ammo is prevented.
Set the attack cooldown to 3 with setAttackCooldown(3)
and verify it using getAttackCooldown()
.
Set the equipped slot to "melee" using setEquipped("melee")
and confirm it with getEquipped()
.
Attempt to set an invalid slot and ensure that the original equipped slot remains unchanged.
Call update()
and verify that it decreases the equipped weapon's cooldown.
Call getEquippedType()
to check if the equipped weapon type updates correctly after calling update()
.
Call getCurrentAmmo()
to ensure it updates correctly after calling update()
.
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files