Skip to content

Docket Meal Display

bhavyamalik1 edited this page Oct 16, 2024 · 1 revision

Test Environment

  • Framework: JUnit 5
  • Objects Used:
    • DocketMealDisplay (under test)

Test Cases - Testing DocketMealDisplay Component Methods

  1. Retrieve Meal Docket Textures
    Purpose: To verify that the static array of meal docket textures is correctly returned.
    Expected Results:

    • The getMealDocketTextures() method should return an array of 10 textures.
    • The returned array should contain both vertical and horizontal texture paths.
  2. Retrieve Meal Image for Vertical Type
    Purpose: To verify that the correct meal image is returned when the type is "vertical".
    Expected Results:

    • For "salad", the image path should be "images/ordersystem/salad_docket.png".
    • For "fruitSalad", the image path should be "images/ordersystem/fruit_salad_docket.png".
    • For "steakMeal", the image path should be "images/ordersystem/steak_meal_docket.png".
    • For "acaiBowl", the image path should be "images/ordersystem/acai_bowl_docket.png".
    • For "bananaSplit", the image path should be "images/ordersystem/banana_split_docket.png".
    • For any other meal name, the method should return null.
  3. Retrieve Meal Image for Horizontal Type
    Purpose: To verify that the correct meal image is returned when the type is not "vertical".
    Expected Results:

    • For "salad", the image path should be "images/ordersystem/salad_docket_vertical.png".
    • For "fruitSalad", the image path should be "images/ordersystem/fruit_salad_docket_vertical.png".
    • For "steakMeal", the image path should be "images/ordersystem/steak_meal_docket_vertical.png".
    • For "acaiBowl", the image path should be "images/ordersystem/acai_bowl_docket_vertical.png".
    • For "bananaSplit", the image path should be "images/ordersystem/banana_split_docket_vertical.png".
    • For any other meal name, the method should return null.
  4. Case-Insensitive Meal Name Matching
    Purpose: To ensure that the getMealImage() method matches meal names in a case-insensitive manner.
    Expected Results:

    • Providing "Salad", "fruitSalad", or "STEAKMEAL" as the meal name should still return the correct image path.
  5. Invalid Meal Names Return Null
    Purpose: To verify that invalid or unsupported meal names return null.
    Expected Results:

    • Providing meal names such as "pasta" or "burger" should return null regardless of the type.
  6. Handling Null and Empty Strings
    Purpose: To ensure that the method handles null and empty strings gracefully.
    Expected Results:

    • Providing a null or empty string for the meal name should return null.
    • Providing a null type should default to returning horizontal images.

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