PotionFactory Unit Testing - UQdeco2800/2022-studio-2 GitHub Wiki

Introduction

This section explains the unit testing for the following unit tests. This code comes from the file called PotionFactoryTest.

Test Code

Each Test will begin with the following code image

The code below tests to check if each potion can be created and assigned the right entityType.

SpeedPotionTest

image

HealthPotionTest

image

HealthRegenPotionTest

image