From 41631e8a18b6710d3f4b6e34cf181976854e479f Mon Sep 17 00:00:00 2001 From: Tastybento Date: Sun, 29 Apr 2018 19:01:30 -0700 Subject: [PATCH] Fixed a few code smells for tests. --- .../bskyblock/island/builders/IslandBuilder.java | 3 --- .../bskyblock/listeners/IslandBanEnforcerTest.java | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java b/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java index 8314b755e..b6474dfa5 100644 --- a/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java +++ b/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java @@ -367,9 +367,6 @@ public class IslandBuilder { b = world.getBlockAt(x, y, z + 1); b.setType(Material.MAGMA); - // Add island items - y = islandHeight; - // Place a helpful sign in front of player placeSign(x, islandHeight + 5, z + 3); // Place the chest - no need to use the safe spawn function diff --git a/src/test/java/us/tastybento/bskyblock/listeners/IslandBanEnforcerTest.java b/src/test/java/us/tastybento/bskyblock/listeners/IslandBanEnforcerTest.java index 0bc8c6689..af9220f53 100644 --- a/src/test/java/us/tastybento/bskyblock/listeners/IslandBanEnforcerTest.java +++ b/src/test/java/us/tastybento/bskyblock/listeners/IslandBanEnforcerTest.java @@ -182,7 +182,7 @@ public class IslandBanEnforcerTest { // Should not be cancelled assertFalse(e.isCancelled()); // User should see no message from this class - Mockito.verify(notifier, Mockito.never()); + Mockito.verify(notifier, Mockito.never()).notify(Mockito.any(), Mockito.any()); } @Test @@ -201,7 +201,7 @@ public class IslandBanEnforcerTest { // Should be cancelled assertTrue(e.isCancelled()); // Player should see a message - Mockito.verify(notifier); + Mockito.verify(notifier).notify(Mockito.any(), Mockito.any()); } @Test @@ -248,7 +248,7 @@ public class IslandBanEnforcerTest { ibe.onPlayerMove(e); assertFalse(e.isCancelled()); // Confirm no check is done on the island - Mockito.verify(im, Mockito.never()); + Mockito.verify(im, Mockito.never()).getProtectedIslandAt(Mockito.any()); } @Test @@ -274,7 +274,7 @@ public class IslandBanEnforcerTest { // Move vehicle ibe.onVehicleMove(new VehicleMoveEvent(vehicle, from, to)); // Confirm no check is done on the island - Mockito.verify(im, Mockito.never()); + Mockito.verify(im, Mockito.never()).getProtectedIslandAt(Mockito.any()); } @Test