mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2025-02-06 15:32:04 +01:00
Fixes failing UnitTests for Challenges Addon.
This commit is contained in:
parent
27d10f2d16
commit
3e542036a0
@ -291,7 +291,7 @@ public class ChallengesAddonTest {
|
||||
addon.setState(State.LOADED);
|
||||
addon.onEnable();
|
||||
verify(plugin).logWarning("[challenges] Level add-on not found so level challenges will not work!");
|
||||
verify(plugin).logWarning("[challenges] Economy plugin not found so money options will not work!");
|
||||
verify(plugin).logWarning("[challenges] Vault plugin not found. Economy will not work!");
|
||||
verify(plugin).log("[challenges] Loading challenges...");
|
||||
verify(plugin, never()).logError("Challenges could not hook into AcidIsland or BSkyBlock so will not do anything!");
|
||||
|
||||
|
@ -60,6 +60,7 @@ import world.bentobox.challenges.config.Settings;
|
||||
import world.bentobox.challenges.database.object.Challenge;
|
||||
import world.bentobox.challenges.database.object.Challenge.ChallengeType;
|
||||
import world.bentobox.challenges.database.object.ChallengeLevel;
|
||||
import world.bentobox.challenges.database.object.requirements.IslandRequirements;
|
||||
import world.bentobox.challenges.events.ChallengeCompletedEvent;
|
||||
import world.bentobox.challenges.events.ChallengeResetAllEvent;
|
||||
import world.bentobox.challenges.events.ChallengeResetEvent;
|
||||
@ -162,6 +163,7 @@ public class ChallengesManagerTest {
|
||||
challenge.setFriendlyName("name");
|
||||
challenge.setLevel(GAME_MODE_NAME + "_novice");
|
||||
challenge.setDescription(Collections.singletonList("A description"));
|
||||
challenge.setRequirements(new IslandRequirements());
|
||||
|
||||
// Challenge Level
|
||||
level = new ChallengeLevel();
|
||||
@ -737,7 +739,7 @@ public class ChallengesManagerTest {
|
||||
@Test
|
||||
public void testCreateChallenge() {
|
||||
@Nullable
|
||||
Challenge ch = cm.createChallenge("newChal", ChallengeType.ISLAND, null);
|
||||
Challenge ch = cm.createChallenge("newChal", ChallengeType.ISLAND, new IslandRequirements());
|
||||
assertEquals(ChallengeType.ISLAND, ch.getChallengeType());
|
||||
assertEquals("newChal", ch.getUniqueId());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user