Skip to content

Commit 281d777

Browse files
committed
Fix test
1 parent 320910c commit 281d777

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/test/java/world/bentobox/aoneblock/listeners/BlockProtectTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import org.powermock.modules.junit4.PowerMockRunner;
4343

4444
import world.bentobox.aoneblock.AOneBlock;
45+
import world.bentobox.aoneblock.Settings;
4546
import world.bentobox.bentobox.database.objects.Island;
4647
import world.bentobox.bentobox.managers.IslandsManager;
4748

@@ -89,6 +90,9 @@ public void setUp() throws Exception {
8990
when(island.getCenter()).thenReturn(location);
9091
when(im.getIslandAt(any())).thenReturn(Optional.of(island));
9192

93+
// Settings
94+
Settings settings = new Settings();
95+
when(addon.getSettings()).thenReturn(settings);
9296
// Class under test
9397
bp = new BlockProtect(addon);
9498
}
@@ -118,7 +122,7 @@ public void testOnBlockDamage() {
118122
bp.onBlockDamage(blockDamageEvent);
119123
verify(addon).inWorld(world);
120124
verify(im).getIslandAt(location);
121-
verify(world, times(48)).spawnParticle(eq(Particle.REDSTONE), eq(null), eq(5),
125+
verify(world, times(80)).spawnParticle(eq(Particle.REDSTONE), eq(null), eq(5),
122126
eq(0.1D), eq(0D), eq(0.1D), eq(1D), any(Particle.DustOptions.class));
123127
}
124128

0 commit comments

Comments
 (0)