Skip to content

Commit

Permalink
questCompletion test
Browse files Browse the repository at this point in the history
  • Loading branch information
kirderf1 committed Dec 19, 2021
1 parent 78ad26e commit a20fd6b
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import hardcorequesting.common.quests.QuestLine;
import hardcorequesting.common.quests.QuestSet;
import hardcorequesting.common.quests.QuestingDataManager;
import net.fabricmc.fabric.api.gametest.v1.FabricGameTest;
import net.minecraft.gametest.framework.GameTest;
import net.minecraft.gametest.framework.GameTestHelper;
Expand Down Expand Up @@ -39,9 +40,13 @@ public void questLineExists(GameTestHelper helper) {
}

@GameTest(template = EMPTY_STRUCTURE)
public void initAsIncomplete(GameTestHelper helper) {
public void questCompletion(GameTestHelper helper) {
Player player = helper.makeMockPlayer();
assertQuestCompletionStatus(QUEST_1, false, player);
getQuest(QUEST_1).completeQuest(player);
assertQuestCompletionStatus(QUEST_1, true, player);
QuestingDataManager.getInstance().getQuestingData(player).getTeam().resetCompletion(getQuest(QUEST_1));
assertQuestCompletionStatus(QUEST_1, false, player);
helper.succeed();
}
}
}

0 comments on commit a20fd6b

Please sign in to comment.