-
Notifications
You must be signed in to change notification settings - Fork 2
Test Plan for StationItemHandler Component
Hayden-Elliott edited this page Aug 28, 2024
·
1 revision
The purpose of this plan is to test the basic functionality of the ItemHandler as of Station teams push
- Framework: JUnit 4
- Objects Used: Station
- Setting the Current Item Purpose: To verify that the current item in the inventory is correctly set. Test methods: shouldSetCurrentItemTest() Expected outcome: The item set using setCurrentItem("meat") should be correctly retrieved as "meat" using getCurrentItem().
- Checking if an Item is Present Purpose: To verify that the inventory correctly identifies when an item is present. Test methods: shouldCheckItemPresentTest() Expected outcome: After setting an item, isItemPresent() should return true, indicating that an item is present.
- Removing an Item When Inventory is Empty Purpose: To verify that removing an item from an empty inventory returns an empty result. Test methods: shouldNotRemoveWhenStationIsEmpty() Expected outcome: When no item is set, removeCurrentItem() should return an empty Optional, indicating no item was removed.
- Checking if an Item is Absent Purpose: To verify that the inventory correctly identifies when no item is present. Test methods: shouldCheckItemAbsentTest() Expected outcome: If no item has been set, isItemPresent() should return false, indicating no item is present.
- Verifying Item Acceptance Purpose: To verify that an item is correctly recognized as present after being set. Test methods: shouldSetItemAccepted() Expected outcome: After setting an item, isItemPresent() should return true, confirming that the item is accepted and present in the inventory.
- Removing the Current Item Purpose: To verify that an item can be correctly removed from the inventory and that the inventory is empty afterward. Test methods: shouldRemoveCurrentItem() Expected outcome: After setting an item, removeCurrentItem() should return the item and isItemPresent() should return false, confirming the item was removed.
Inventory System
Scoring System
Food Recipes
Level System
Player Actions
Ordering System
Stations
Items
Map Design
Customers
Pause Menu
Upgrades
End of Day Display
Day Night Cycle
Moral System
Debug Terminal
Game Interactions Tutorial
Backstory Cutscenes
Entities and Components
Input Handling
Game Screens and Areas
Fire Extinguisher Handler Component
MainGameActions Create Docket Triggers
Main Game Order Button Display
BackstoryCutsceneDisplay Test Plan
Test Plan for MainGameOrderTicketDisplay
Test Plan for MainGameOrderBtnDisplay
Test Plan for DocketLineDisplay
Test plan for RandomComboService
Test plan for SpeedBoostUpgrade
Test plan for DancePartyUpgrade