Skip to content

Eagle Testing

Jul-Wong edited this page Aug 26, 2024 · 10 revisions

This details the tests run for the creation of a eagle entity. It tests various features and ensures the correct creation of that NPC. These tests can be located in NPCFactoryTest.java from lines 363 to 494.

Testing Plan

Creation Tests

  • TestEagleCreation(): Tests the creation of a eagle and ensures that the eagle is not null.
  • TestEagleName(): Tests the eagle is properly identified as a eagle.
  • TestEagleIsEntity(): Tests that the eagle is an entity.
  • TestEagleHasPhysicsComponent(): Tests the eagle has a physics component to interact with the world.
  • TestEagleHasPhysicsMovementComponent(): Tests the chow has a physics movement component to interact with the world.
  • TestEagleHasColliderComponent(): Tests the eagle has a hitbox and collides with other entities and objects.
  • TestEagleHasConfigComponent(): Tests the eagle has a config component to ensure correct stats.
  • TestEagleHasCorrectHP(): Tests the eagle has the correct HP (30HP).
  • TestEagleHasCorrectBaseAttack(): Tests the eagle has the correct base attack stat (Default for all friendly NPC's should be 0).
  • TestEagleHasCorrectSoundPath(): Tests that the eagle has the correct sound path which will indicate the NPC's dialogue use.
  • TestEagleHasCorrectBaseHint(): Tests that the eagle's base hint is correct.

Movement Tests

  • TestEagleHasAnimation(): Tests the has a working idle animation.
  • TestEagleSetPosition(): Tests the eagle is spawned in the correct location.
Clone this wiki locally