-
Notifications
You must be signed in to change notification settings - Fork 9
Test Plan for Companion Lab window
The LabWindow class is responsible for creating a laboratory window in the game where players can interact with various potions and perform actions. This test plan outlines test scenarios to ensure that the LabWindow class functions correctly and displays potion images as expected.
stage (
Mock): Simulates the game stage.
potionStage
(Mock): Simulates the stage for potion images.
- Create a new instance of LabWindow.
LabWindow labWindow = LabWindow.MakeNewLaboratory();
stage.addActor(labWindow);
- Add potion images to the potionStage.
addPotionImagesToStage(potionStage);
- Simulate a rendering cycle for the game.
Gdx.graphics.getGL20().glClearColor(0, 0, 0, 0);
Gdx.graphics.getGL20().glClear(GL20.GL_COLOR_BUFFER_BIT);
- Render the potion images on the potionStage
potionStage.act(Gdx.graphics.getDeltaTime());
potionStage.draw();
- Assert that potion images are present on the potionStage using their actor names.
assertNotNull(potionStage.getRoot().findActor("DeathPotionImage"));
assertNotNull(potionStage.getRoot().findActor("SpeedPotionImage"));
This test plan verifies the creation of the LabWindow and the presence of potion images on the stage. It ensures that the LabWindow functions correctly and displays potion images as expected in the game.
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files