Skip to content

Test Plan for StationItemHandler Component

Hayden-Elliott edited this page Aug 28, 2024 · 1 revision

The purpose of this plan is to test the basic functionality of the ItemHandler as of Station teams push

Test Environment

  • Framework: JUnit 4
  • Objects Used: Station

Test Cases - Testing ItemHandlerComponent

  1. Setting the Current Item Purpose: To verify that the current item in the inventory is correctly set. Test methods: shouldSetCurrentItemTest() Expected outcome: The item set using setCurrentItem("meat") should be correctly retrieved as "meat" using getCurrentItem().
  2. Checking if an Item is Present Purpose: To verify that the inventory correctly identifies when an item is present. Test methods: shouldCheckItemPresentTest() Expected outcome: After setting an item, isItemPresent() should return true, indicating that an item is present.
  3. Removing an Item When Inventory is Empty Purpose: To verify that removing an item from an empty inventory returns an empty result. Test methods: shouldNotRemoveWhenStationIsEmpty() Expected outcome: When no item is set, removeCurrentItem() should return an empty Optional, indicating no item was removed.
  4. Checking if an Item is Absent Purpose: To verify that the inventory correctly identifies when no item is present. Test methods: shouldCheckItemAbsentTest() Expected outcome: If no item has been set, isItemPresent() should return false, indicating no item is present.
  5. Verifying Item Acceptance Purpose: To verify that an item is correctly recognized as present after being set. Test methods: shouldSetItemAccepted() Expected outcome: After setting an item, isItemPresent() should return true, confirming that the item is accepted and present in the inventory.
  6. Removing the Current Item Purpose: To verify that an item can be correctly removed from the inventory and that the inventory is empty afterward. Test methods: shouldRemoveCurrentItem() Expected outcome: After setting an item, removeCurrentItem() should return the item and isItemPresent() should return false, confirming the item was removed.

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