COMPANION ANIMATION CONTROLLER TEST PLAN - UQcsse3200/2023-studio-2 GitHub Wiki
Test Plan for CompanionAnimationController Class
Initialization and Animation Tests
1. Test Initialization
- Create an instance of
CompanionAnimationController
.
- Verify that the object is created successfully and that the animator and infanimator components are initialized correctly.
2. Test Animation Initialization (Uncommented Version)
- Uncomment the code responsible for initializing the infant companion animation renderer and event listeners.
- Ensure that the infant companion animation renderer and event listeners are set up correctly.
3. Test Animation Initialization (Commented Version)
- Comment the code responsible for initializing the infant companion animation renderer and event listeners.
- Ensure that the infant companion animation-related methods are not triggered.
4. Test animateLeft
Method
- Create an instance of
CompanionAnimationController
.
- Call the
animateLeft
method.
- Verify that the companion's left animation is started correctly.
5. Test animateRight
Method
- Create an instance of
CompanionAnimationController
.
- Call the
animateRight
method.
- Verify that the companion's right animation is started correctly.
6. Test animateUp
Method
- Create an instance of
CompanionAnimationController
.
- Call the
animateUp
method.
- Verify that the companion's up animation is started correctly.
7. Test animateDown
Method
- Create an instance of
CompanionAnimationController
.
- Call the
animateDown
method.
- Verify that the companion's down animation is started correctly.
8. Test animateUpLeft
Method
- Create an instance of
CompanionAnimationController
.
- Call the
animateUpLeft
method.
- Verify that the companion's up-left animation is started correctly.
9. Test animateUpRight
Method
- Create an instance of
CompanionAnimationController
.
- Call the
animateUpRight
method.
- Verify that the companion's up-right animation is started correctly.
10. Test animateDownLeft
Method
- Create an instance of
CompanionAnimationController
.
- Call the
animateDownLeft
method.
- Verify that the companion's down-left animation is started correctly.
11. Test animateDownRight
Method
- Create an instance of
CompanionAnimationController
.
- Call the
animateDownRight
method.
- Verify that the companion's down-right animation is started correctly.
12. Test animateStop
Method
- Create an instance of
CompanionAnimationController
.
- Call the
animateStop
method with a Vector2
parameter representing the last movement direction.
- Ensure that the correct standing animation is started based on the direction.
13. Test animateStop
Method (Direction: Left)
- Create an instance of
CompanionAnimationController
.
- Call the
animateStop
method with a Vector2
parameter representing the last movement direction as left.
- Verify that the companion's left standing animation is started.
14. Test animateStop
Method (Direction: Right)
- Create an instance of
CompanionAnimationController
.
- Call the
animateStop
method with a Vector2
parameter representing the last movement direction as right.
- Verify that the companion's right standing animation is started.
15. Test animateStop
Method (Direction: Up)
- Create an instance of
CompanionAnimationController
.
- Call the
animateStop
method with a Vector2
parameter representing the last movement direction as up.
- Verify that the companion's up standing animation is started.
16. Test animateStop
Method (Direction: Down)
- Create an instance of
CompanionAnimationController
.
- Call the
animateStop
method with a Vector2
parameter representing the last movement direction as down.
- Verify that the companion's down standing animation is started.
17. Test Animation Events (Infant Companion)
- Uncomment the code responsible for initializing the infant companion animation renderer and event listeners.
- Trigger animation events for the infant companion and verify that the corresponding animations are started.