Fixed a few code smells for tests.

This commit is contained in:
Tastybento 2018-04-29 19:01:30 -07:00
parent 3cbcf52319
commit 41631e8a18
2 changed files with 4 additions and 7 deletions

View File

@ -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

View File

@ -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