generated from UQcsse3200/game-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Currency System's Test Plan
Thanh Nhat Quang Mai edited this page Sep 18, 2025
·
9 revisions
In order to ensure the currency system and the game run safely, we will validate the following:
| Component | Code Coverage (Sonarcloud) |
|---|---|
| CurrencyComponent | 100% |
| CurrencyFactoryComponent | 87.5% |
| CurrencyManagerComponent | 100% |
| CollectibleComponent | 90.6% |
| GameStateService | 100% |
- Verify that the getters
getTypeandgetValuefor currency value and type return the correct results.
- Ensure currency types and their quantities are tracked and updated correctly.
- Ensure methods
addCurrencyAmountandsubtractCurrencyAmountincrement and decrement correctly. - Verify that method
addCurrencyEntityadds currency entities tocurrencyListcorrectly and does not add the same entity twice. - Ensure method
getCurrencyListreturns correct list. - Ensure method
collectCurrencysuccessfully increments counter and triggers to update UI. - Ensure method
canAffordAndSpendCurrencycorrectly deducts currencies by the given cost map and returns true if the player can afford, otherwise does not deduct anything and returns false. - Ensure method
dropCurrencyupdates the player’s balance and triggers UI changes when enemies drop currencies. - Ensure method
refundCurrencyrefunds the correct portion of the original cost based on the refund rate.
- Verify that currencies can only be collected when the user clicks within the defined radius, and not otherwise.
- Tested via unit tests and visual validation during gameplay.
- Ensure methods
createCurrencyworks with expected values and positions.
- Verify that the
getStars,setStars, andupdateStarsmethods all work as intended.
- Ensure the currency counter increments correctly as currencies are collected.
- Tested via visual validation during gameplay.
- Confirm that the UI reflects the updated counter in real time as currencies are collected.
- Includes in-game currencies on the main game screen, as well as the meta currency (stars) on the main menu screen.
- Tested via visual validation during gameplay.


