Added test for isCheckForBlocks

This commit is contained in:
tastybento 2021-02-28 15:25:30 -08:00
parent bae0e6c36f
commit a8473c27a9

View File

@ -230,5 +230,16 @@ public class DefaultNewIslandLocationStrategyTest {
when(adjBlock.isEmpty()).thenReturn(false);
assertEquals(Result.BLOCKS_IN_AREA, dnils.isIsland(location));
}
/**
* Test method for {@link world.bentobox.bentobox.managers.island.DefaultNewIslandLocationStrategy#isIsland(org.bukkit.Location)}.
*/
@Test
public void testIsIslandBlocksInAreaNoCheck() {
when(iwm.isCheckForBlocks(any())).thenReturn(false);
when(adjBlock.getType()).thenReturn(Material.STONE);
when(adjBlock.isEmpty()).thenReturn(false);
assertEquals(Result.FREE, dnils.isIsland(location));
}
}