Fixed IslandCache test class.

Added mock to make island.isOwned() true.
This commit is contained in:
tastybento 2019-12-08 11:58:34 -08:00
parent a42da35174
commit 3dc836bbfe

View File

@ -18,7 +18,6 @@ import org.bukkit.Location;
import org.bukkit.World;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@ -41,7 +40,6 @@ import world.bentobox.bentobox.util.Util;
@RunWith(PowerMockRunner.class)
@PrepareForTest({BentoBox.class, Util.class})
@Ignore("Illegal reflective access operations occurring")
public class IslandCacheTest {
@Mock
@ -90,6 +88,7 @@ public class IslandCacheTest {
when(location.getBlockZ()).thenReturn(0);
when(island.getCenter()).thenReturn(location);
when(island.getOwner()).thenReturn(owner);
when(island.isOwned()).thenReturn(true);
Builder<UUID> members = new ImmutableSet.Builder<>();
members.add(UUID.randomUUID());
members.add(UUID.randomUUID());