Test Plan for SpawnRecipeCommands - UQcsse3200/2024-studio-3 GitHub Wiki
- Framework: JUnit4
- Objects Used: -
The purpose of this test is to verify that the SpawnRecipeCommands can successfully spawn a "Banana Split" meal and add it to the players inventory.
testSpawnBananaSplit()
- The inventory is initially empty and not full.
- A "Banana Split" meal entity is created using mocked ingredients (
strawberry,chocolate,banana). - The spawned meal is added to the players inventory.
- The command returns
true, indicating success.
The purpose of this test is to verify that the SpawnRecipeCommands handles invalid recipe names and does not add anything to the inventory.
testInvalidArgument()
- The recipe argument is invalid.
- No item is created or added to the players inventory.
- The command returns
false, indicating failure.
The purpose of this test is to verify that the SpawnRecipeCommands can successfully spawn a "Fruit Salad" meal and add it to the players inventory.
testSpawnFruitSalad()
- The inventory is initially empty and not full.
- A "Fruit Salad" meal entity is created using mocked ingredients (
strawberry,banana). - The spawned meal is added to the players inventory.
- The command returns
true, indicating success.
The purpose of this test is to verify that the SpawnRecipeCommands fails to execute when no arguments are provided.
testNoArgs()
- No arguments are passed to the command.
- No item is created or added to the players inventory.
- The command returns
false, indicating failure due to missing arguments.