-
Notifications
You must be signed in to change notification settings - Fork 2
LoanUpgrade
- Framework: JUNIT 5
- Dependencies:
-
LoanUpgrade
: Class being tested -
CombatStatsComponent
: Mocked to simulate players gold status -
Entity
: Represents player entity -
EventHandler
: Triggers various events -
ServiceLocater
: Retrieves certain services such asPlayerService
&RandomComboService
-
RandomComboService
: handles random combo events -
Gdx and Input
: simulates key presses
1. activate when sufficient gold
-
Purpose: Verifies that
activate
method adds gold -
Setup:
- Mock
CombatStatsComponent
to return 20 gold whengetGold
is called - Invoke
activate
method on instance
- Mock
-
Expected Outcome: that
addGold
method ofCombatStatsComponent
is called with arg 100 to add gold to player
2. not activate when insufficient gold
-
Purpose: To ensure
activate
triggers the "notenoughmoney" event if player has insufficient money -
Setup: Mocks
CombatStatsComponent
and invokesactivate
-
Expected Outcome: the
trigger
method ofrandomComboServiceEvents
is called when arg is "notenoughmoney"
3. activates when key is pressed
-
Purpose: To verify the
update
method callsactivate
whenL
is pressed -
Setup:
- use reflection to mock
Gdx.input
to simulate key presses - Mock
input
to return true whenL
is pressed - Spies on
LoanUpgrade
to monitor calls toactivate
- Calls
update
method
- use reflection to mock
-
Expected Outcome:
activate
method onloanupgrade
is called whenL
is pressed
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