Skip to content

Eagle Testing

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

This details the tests run for the creation of a cow 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).

Movement Tests

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

Interaction Tests

  • TestEagleGetInitialHintLevel(): Tests the eagle's hint system by getting the initial hint level from which the hints cycle from.
  • TestUpdateEagleHint(): Tests the hint levels change so the same hint is displayed one after another.
  • TestEagleHintIsNotNull(): Tests the hint exists.
Clone this wiki locally