-
Notifications
You must be signed in to change notification settings - Fork 1
Junit test for NPC
Bokai Zhang edited this page Sep 12, 2022
·
1 revision
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