Skip to content

Test Plan for Item Component

Princess-Nx edited this page Aug 28, 2024 · 2 revisions

Overview

The ItemComponentTest class is responsible for unit testing the ItemComponent class, which represents an item entity in the game with properties such as itemName, itemType, and weight. The test case in this class ensures that the constructor initializes these properties correctly. The test goal is to ensure that the constructor of ItemComponent correctly initializes the component with the expected values for itemName, itemType, and weight.

Test Case

  1. ItemComponent Constructor Test
  • Objective: Validate that the ItemComponent constructor correctly assigns the values passed to it for the itemName, itemType, and weight attributes.
  • Testing Steps: Create an instance of ItemComponent with the correct attributes. Expected Result: All assertions should pass, confirming that the constructor correctly initializes the ItemComponent instance.
  1. Test Structure:
  • No specific setup is required. The test directly initializes an instance of ItemComponent in the test method.
  1. Individual Test Methods:
  • The test case is focused on validating the constructor, ensuring that each attribute is initialized correctly.
  1. Assertions:
  • The test uses assertEquals to validate the values of itemName, itemType, and weight against the expected values.

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