-
Notifications
You must be signed in to change notification settings - Fork 1
Eagle Testing
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
and can be found from lines 759 to 840.
-
testEagleInitialisation
Checks the initialisation of the NPC by verifying its creation, name, type, and the presence of necessary components. This includes:
-
Verifying that the
eagle
object is not null, ensuring it was created successfully. -
Checking if the eagle entity has the correct name "Eagle" as specified in the configuration.
-
Confirming that the eagle object is of type
Entity
, verifying its inheritance or implementation. -
Ensuring the eagle entity has a
PhysicsComponent
, which is necessary for physical interactions. -
Validating that the eagle entity includes a
PhysicsMovementComponent
, which handles its movement physics. -
Verifying that the eagle entity has a
ColliderComponent
for collision detection. -
Checking if the eagle entity has a
ConfigComponent
to manage its configuration settings.
-
TestEagleHasCorrectSoundPath
: Ensures the sound path for the eagle is correctly set to "sounds/eagle-scream.wav" in the configuration. -
TestEagleHasCorrectBaseHint
: Confirms that the base hint for the eagle is set correctly, matching "Welcome to Animal Kingdom!" and "I am Ethan the Eagle." -
TestEagleIsFriendly
: Ensures the eagle entity has aFriendlyNPCAnimationController
, indicating that it is a non-aggressive NPC.
-
TestEagleHasAnimation
: Validates that the eagle entity has an idle animation named "float", ensuring visual representation. -
TestEagleSetPosition
: Verifies that the eagle entity is placed correctly at the specified position (0,0) and can be moved to that location.