From 9c7dd530fe7365ed3671dd627e35921c971b24d1 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 20 Feb 2021 12:29:19 -0800 Subject: [PATCH] Fix tests --- .../java/com/wasteofplastic/invswitcher/StoreTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/com/wasteofplastic/invswitcher/StoreTest.java b/src/test/java/com/wasteofplastic/invswitcher/StoreTest.java index cfd7893..00a2e21 100644 --- a/src/test/java/com/wasteofplastic/invswitcher/StoreTest.java +++ b/src/test/java/com/wasteofplastic/invswitcher/StoreTest.java @@ -9,6 +9,7 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.util.Collections; import java.util.Comparator; import java.util.UUID; @@ -47,6 +48,8 @@ public class StoreTest { @Mock private World world; + private com.wasteofplastic.invswitcher.Settings sets; + @Before public void setUp() { BentoBox plugin = mock(BentoBox.class); @@ -74,6 +77,10 @@ public void setUp() { // World 2 World fromWorld = mock(World.class); when(fromWorld.getName()).thenReturn("from_the_end_nether"); + + sets = new com.wasteofplastic.invswitcher.Settings(); + when(addon.getSettings()).thenReturn(sets); + when(addon.getWorlds()).thenReturn(Collections.singleton(world)); } @After