-
Notifications
You must be signed in to change notification settings - Fork 0
UGS Class Testing
JumpOffACliffy edited this page Oct 18, 2022
·
5 revisions
Based off of feedback received from sprints 1-2, the following ideas were integrated into the UGS:
- Creating a unified grid positioning system which maintains the state of all entities and map layouts
- Creating a snappable grid layout (i.e. if users click anywhere within a grid tile, the building is built in the centre of the tile)
- Creating methods to allow easy utilisation of UGS features
In accordance with the Test Plan tests were written for the UGS and the Tile classes.
Requirement | Test case addressed by |
---|---|
Test a UGS can be correctly created | shouldCreateUGS |
Test a coordinate can be correctly generated | shouldGenerateCoordinate |
Tests that a Tile can be added to the UGS, and that the UGS returns correct result given a coordinate | testReturnSmallHashmap |
Tests a Tile within the UGS can be updated | testSetTileType |
Tests a Tile within the UGS can be updated to contain a new entity | testSetEntity |
Tests the UGS returns the correct tileType given it contains multiple tiles | testReturnMultipleTiles |
Tests the return value of the UGS is independent of the input | testReturnGeneratedTiles |
Tests the UGS can be updated with a large entity | TestSetLargeEntity |
Tests an entity can be returned by coordinate | testGetEntity |
Tests an entity can be returned by string | testGetNamedEntity |
Tests an entity can be removed from the UGS | testRemoveEntity |
Requirement | Test case addressed by |
---|---|
Test the no-parameter constructor works correctly | testConstructorNoParams |
Test the constructor which only takes an entity works correctly | testConstructorEntity |
Test the constructor which only takes a tileType works correctly | testConstructorTileType |
Test the setters work correctly | testSetters |
In the future, the team will need to expand upon tests for all classes to ensure test coverage is as high as possible.
The Final Boss
Shop
Inventory
Achievements
Infrastructure
User Interfaces Across All Pages
User Interfaces Buildings
Guidebook
[Resource Management](Resource-Management)