Test Plan for MainGameActions create docket triggers - UQcsse3200/2024-studio-3 GitHub Wiki

Test Environment

  • Framework: JUnit 5
  • Dependencies:
    • MainGameActionsTest: The main class under test.
    • ServiceLocator: Manages the services used in the game.
    • Mocked components like RenderService and OrthographicCamera to simulate their behaviour
    • Mock and statically mock MainGameOrderTicketDisplay to simulate order ticket behaviour.
    • ArrayList: Holds a list of tables which have the order tickets

Test Cases

1. Create order below the order limit

  • Purpose: Check that a docket is created when the order table list is below the limit.
  • Setup: create a docket with the table list size below the limit
  • Expected Outcome: setRecipe and addActors is called

2. Create order above the order limit

  • Purpose: Ensure that an order is not created when the order table list is above the limit.
  • Setup: create order with the table list size above the limit
  • Expected Outcome: setRecipe and addActors are never called

3. Create Acai docket

  • Purpose: Check that Acai Bowl docket is created
  • Setup: call onCreateAcai
  • Expected Outcome: setRecipe is called using acai recipe name and addActors is called

4. Create banana docket

  • Purpose: Check that banana docket is created
  • Setup: call onCreateBanana
  • Expected Outcome: setRecipe is called using banana recipe name and addActors is called

5. Create salad docket

  • Purpose: Check that salad docket is created
  • Setup: call onCreateSalad
  • Expected Outcome: setRecipe is called using salad recipe name and addActors is called

6. Create steak docket

  • Purpose: Check that steak docket is created
  • Setup: call onCreateSteak
  • Expected Outcome: setRecipe is called using steak recipe name and addActors is called

7. Create fruit salad docket

  • Purpose: Check that fruit salad docket is created
  • Setup: call onCreateFruitSalad
  • Expected Outcome: setRecipe is called using fruit salad recipe name and addActors is called