Skip to content

Test Plan for SpawnRecipeCommands

Zachary Adams edited this page Oct 17, 2024 · 2 revisions

Test Environment

  • Framework: JUnit4
  • Objects Used: -

Test Cases - Testing SpawnRecipeCommands

Spawn Banana Split Recipe

Purpose:

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.

Test Method:

testSpawnBananaSplit()

Expected Outcome:

  • 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.

Invalid Recipe Argument

Purpose:

The purpose of this test is to verify that the SpawnRecipeCommands handles invalid recipe names and does not add anything to the inventory.

Test Method:

testInvalidArgument()

Expected Outcome:

  • The recipe argument is invalid.
  • No item is created or added to the players inventory.
  • The command returns false, indicating failure.

Spawn Fruit Salad Recipe

Purpose:

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.

Test Method:

testSpawnFruitSalad()

Expected Outcome:

  • 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.

No arguments provided

Purpose:

The purpose of this test is to verify that the SpawnRecipeCommands fails to execute when no arguments are provided.

Test Method:

testNoArgs()

Expected Outcome:

  • 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.

Table of Contents

Home

Team Design Document

Game Features

Inventory System
Scoring System
Food Recipes
Level System
Player Actions
Ordering System
Stations
Items
Map Design
Customers
Pause Menu
Upgrades
End of Day Display
Day Night Cycle
Moral System
Debug Terminal
Game Interactions Tutorial
Backstory Cutscenes

Game

Getting Started

Entities and Components

World Backstory

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Map Design

Test Plans

Sensor Component

Customer Sensor Component

Interaction Component

Inventory Component

Inventory Display

Station Meal Component

Station Progress Display

Keyboard Input Component

Fire Extinguisher Handler Component

Score System

HoverBox Component

MainGameActions Create Docket Triggers

End Day Display Component

Cutscene Area

Docket

Docket Line Display

Docket Meal Display

Main Game Order Button Display

Order Actions

Recipe

Ticket Details Component

BackstoryCutscene Test Plan

BackstoryCutsceneDisplay Test Plan

Test Plan for Tutorial

Keybinds

Keybinds Test Plan

Test Plan for MainGameOrderTicketDisplay

Test Plan for MainGameOrderBtnDisplay

Test Plan for Docket

Test Plan for DocketLineDisplay

Test Plan for OrderActions

Ticket Details

Test plan for RandomComboService

Test plan for LoanUpgrade

Test plan for UpgradesDisplay

Test plan for RageUpgrade

Test plan for SpeedBoostUpgrade

Test plan for DancePartyUpgrade

Test plan for ExtortionUpgrade

Troubleshooting

MacOS Setup Guide

Clone this wiki locally