Test Plan for Interaction Component - UQcsse3200/2024-studio-3 GitHub Wiki

Test Environment

  • Framework: JUnit 4
  • Objects Used: InteractionComponent, Entity (mocked)

Test Cases - Testing InteractionComponent Methods

  1. Should be a sensor: To verify that the InteractionComponent is a sensor after it has been created. Purpose: To ensure that the interaction component does not interfere with where the player can go in the world Expected Results: The fixture inside the interaction component should return true when the isSensor() function is called.
  2. Should be interactable: To verify that the interaction component is on the INTERACTABLE physics layer. Purpose: To ensure that only interactable objects can collide with the component Expected Results: The components layer is equal to the INTERACTABLE layer when the PhysicsLayer.contains() function is called
  3. Should have a fixture: To verify that the interaction component was created with a fixture Purpose: To ensure that the component can collide with other colliders Expected Results: The getFixture() function should not return null