Removed tests.

This commit is contained in:
tastybento 2019-04-28 07:32:42 -07:00
parent 2ee03cd081
commit 4472817b07

View File

@ -1123,78 +1123,4 @@ public class IslandsManagerTest {
assertEquals(island, im.getIslandById(uuid).get());
}
/**
* Test method for {@link IslandsManager#fixIslandCenter(Island)}.
*/
@Test
public void testFixIslandCenter() {
// Setup
when(iwm.inWorld(Mockito.any(World.class))).thenReturn(true);
when(iwm.getIslandXOffset(Mockito.any())).thenReturn(0);
when(iwm.getIslandZOffset(Mockito.any())).thenReturn(0);
Island island = mock(Island.class);
Location center = mock(Location.class);
when(center.getWorld()).thenReturn(world);
when(center.getBlockX()).thenReturn(129);
when(center.getBlockY()).thenReturn(120);
when(center.getBlockZ()).thenReturn(127);
when(island.getCenter()).thenReturn(center);
when(island.getRange()).thenReturn(64);
when(island.getWorld()).thenReturn(world);
// Test
IslandsManager im = new IslandsManager(plugin);
im.fixIslandCenter(island);
Location loc = new Location(world, 128, 120, 128);
Mockito.verify(island).setCenter(Mockito.eq(loc));
}
/**
* Test method for {@link IslandsManager#fixIslandCenter(Island)}.
*/
@Test
public void testFixIslandCenterOffsets() {
// Setup
when(iwm.inWorld(Mockito.any(World.class))).thenReturn(true);
when(iwm.getIslandXOffset(Mockito.any())).thenReturn(10);
when(iwm.getIslandZOffset(Mockito.any())).thenReturn(10);
Island island = mock(Island.class);
Location center = mock(Location.class);
when(center.getWorld()).thenReturn(world);
when(center.getBlockX()).thenReturn(1295);
when(center.getBlockY()).thenReturn(120);
when(center.getBlockZ()).thenReturn(1295);
when(island.getCenter()).thenReturn(center);
when(island.getRange()).thenReturn(64);
when(island.getWorld()).thenReturn(world);
// Test
IslandsManager im = new IslandsManager(plugin);
im.fixIslandCenter(island);
Location loc = new Location(world, 1290, 120, 1290);
Mockito.verify(island).setCenter(Mockito.eq(loc));
}
/**
* Test method for {@link IslandsManager#fixIslandCenter(Island)}.
*/
@Test
public void testFixIslandCenterOffsetsNegatives() {
// Setup
when(iwm.inWorld(Mockito.any(World.class))).thenReturn(true);
when(iwm.getIslandXOffset(Mockito.any())).thenReturn(0);
when(iwm.getIslandZOffset(Mockito.any())).thenReturn(0);
Island island = mock(Island.class);
Location center = mock(Location.class);
when(center.getWorld()).thenReturn(world);
when(center.getBlockX()).thenReturn(-1295);
when(center.getBlockY()).thenReturn(120);
when(center.getBlockZ()).thenReturn(-1287);
when(island.getCenter()).thenReturn(center);
when(island.getRange()).thenReturn(64);
when(island.getWorld()).thenReturn(world);
// Test
IslandsManager im = new IslandsManager(plugin);
im.fixIslandCenter(island);
Location loc = new Location(world, -1280, 120, -1280);
Mockito.verify(island).setCenter(Mockito.eq(loc));
}
}