Junit test for NPC - UQdeco2800/2022-studio-2 GitHub Wiki
To test whether the npc we created met our requirements, we created a series of tests for it to help us confirm its accuracy. All the test classes are written in the EntityTest.java file.
1.Test whether each NPC is present on the map.
2.Test that all NPCs are located within the specified range.
Start testing with the existing Junit5 test format
Determine if Guard exists by determining where it is on the map.
For the remaining MaleCitizen, Child, PlumberFriend, HumanGuard and OneLegGirl I used the same method to test if it was present on the map.
Test if the npc's position is between 0 and 20 by iterating over the location on the map, using the from, to method.
- Bokai Zhang
- GitHub: hideonbush-crl
- Discord: Bkai Z#6469
- File change: EntityTest.java