From 4472817b07744806a565f0e70b845053b6a3c64a Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 28 Apr 2019 07:32:42 -0700 Subject: [PATCH] Removed tests. --- .../bentobox/managers/IslandsManagerTest.java | 74 ------------------- 1 file changed, 74 deletions(-) diff --git a/src/test/java/world/bentobox/bentobox/managers/IslandsManagerTest.java b/src/test/java/world/bentobox/bentobox/managers/IslandsManagerTest.java index e272496cc..096d929d5 100644 --- a/src/test/java/world/bentobox/bentobox/managers/IslandsManagerTest.java +++ b/src/test/java/world/bentobox/bentobox/managers/IslandsManagerTest.java @@ -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)); - } }