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
andOrthographicCamera
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
andaddActors
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
andaddActors
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 andaddActors
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 andaddActors
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 andaddActors
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 andaddActors
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 andaddActors
is called