Skip to content

TNTAnimationController Test Plan

Mohamad Dabboussi edited this page Sep 11, 2023 · 1 revision

Test Plan for TNTAnimationController

Introduction

Animations add life to game elements and contribute to an immersive user experience. It's crucial to ensure that the TNTAnimationController behaves as expected to provide a consistent game atmosphere. This test plan outlines the testing procedures.

Objective

The aim is to validate that the TNTAnimationController correctly triggers animations in response to various events, ensuring:

  1. The correct animation plays when the "digStart" event is triggered.
  2. The correct animation plays when the "defaultStart" event is triggered.
  3. The correct animation plays when the "explodeStart" event is triggered.

Methodology

Setup (BeforeEach)

  • Initialize necessary services and resources for testing using ServiceLocator.
  • Register PhysicsService, ResourceService, and RenderService with ServiceLocator.
  • Load textures and texture atlases for the TNT Tower using a new ResourceService instance.

Test Cases

Test Case 1: testAnimateDig

Objective: To verify that the "dig" animation plays when "digStart" is triggered.

Steps:

  1. Trigger the "digStart" event on the entity.
  2. Verify that the AnimationRenderComponent's getCurrentAnimation method returns "dig".

Test Case 2: testAnimateDefault

Objective: To verify that the "default" animation plays when "defaultStart" is triggered.

Steps:

  1. Trigger the "defaultStart" event on the entity.
  2. Verify that the AnimationRenderComponent's getCurrentAnimation method returns "default".

Test Case 3: testAnimateExplode

Objective: To verify that the "explode" animation plays when "explodeStart" is triggered.

Steps:

  1. Trigger the "explodeStart" event on the entity.
  2. Verify that the AnimationRenderComponent's getCurrentAnimation method returns "explode".

Assumptions

  1. The ServiceLocator class functions as expected and has been previously tested.
  2. The AnimationRenderComponent class has methods and behavior that are correctly implemented.
  3. External extensions such as MockitoExtension and GameExtension function as expected.
Clone this wiki locally