-
Notifications
You must be signed in to change notification settings - Fork 1
QuestTest
remmy edited this page Oct 12, 2024
·
1 revision
The QuestTest class verifies the initialization, completion, and failure scenarios for a quest. It checks the quest's name, description, task progression, and updates its status upon completion or failure. Below you can find all the tests and setup for this test class.
private Quest quest;
@BeforeEach
void setUp() {
// Initialize the task with a required number of triggers
Task stepsTask = new Task("steps", "Take your first steps", "Just start moving!", 5, 0, false, false);
// Create the quest with the task
quest = new Quest("First Steps",
"Take your first steps in this world!",
List.of(stepsTask),
false,
null,
null,
true,
false,
0,
null);
}
-
basicQuestCompletion():
Tests the quest's completion process by simulating progression of the quest. -
basicQuestFailure():
Verifies the quest failure process.