mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 11:15:24 +01:00
Fix tests - just counts of events.
This commit is contained in:
parent
8b474833e1
commit
0a4fc83218
@ -235,7 +235,7 @@ public class AdminTeamDisbandCommandTest {
|
||||
verify(user).sendMessage("commands.admin.team.disband.success", TextVariables.NAME, name[0]);
|
||||
verify(p).sendMessage("commands.admin.team.disband.disbanded");
|
||||
verify(p2).sendMessage("commands.admin.team.disband.disbanded");
|
||||
// 2 * 2 + 1
|
||||
verify(pim, times(5)).callEvent(any());
|
||||
// 2 * 2
|
||||
verify(pim, times(4)).callEvent(any());
|
||||
}
|
||||
}
|
||||
|
@ -217,8 +217,8 @@ public class AdminTeamKickCommandTest {
|
||||
verify(im).removePlayer(eq(world), eq(notUUID));
|
||||
verify(pm).clearHomeLocations(eq(world), eq(notUUID));
|
||||
verify(user).sendMessage(eq("commands.admin.team.kick.success"), eq(TextVariables.NAME), eq(name), eq("[owner]"), anyString());
|
||||
// Offline so event will be called six time
|
||||
verify(pim, times(6)).callEvent(any());
|
||||
// Offline so event will be called 5 times
|
||||
verify(pim, times(5)).callEvent(any());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -257,8 +257,8 @@ public class IslandResetCommandTest {
|
||||
assertTrue(irc.execute(user, irc.getLabel(), Collections.emptyList()));
|
||||
// TODO Verify that panel was shown
|
||||
// verify(bpm).showPanel(any(), eq(user), eq(irc.getLabel()));
|
||||
// Verify event (13 * 2 + 1)
|
||||
verify(pim, times(27)).callEvent(any(IslandBaseEvent.class));
|
||||
// Verify event (13 * 2)
|
||||
verify(pim, times(26)).callEvent(any(IslandBaseEvent.class));
|
||||
// Verify messaging
|
||||
verify(user).sendMessage("commands.island.create.creating-island");
|
||||
verify(user, never()).sendMessage(eq("commands.island.reset.kicked-from-island"), eq(TextVariables.GAMEMODE), anyString());
|
||||
@ -446,8 +446,8 @@ public class IslandResetCommandTest {
|
||||
// Reset command, no confirmation required
|
||||
assertTrue(irc.execute(user, irc.getLabel(), Collections.singletonList("custom")));
|
||||
verify(user).sendMessage("commands.island.create.creating-island");
|
||||
// Verify event (13 * 2 + 1)
|
||||
verify(pim, times(27)).callEvent(any(IslandBaseEvent.class));
|
||||
// Verify event (13 * 2)
|
||||
verify(pim, times(26)).callEvent(any(IslandBaseEvent.class));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ public class IslandEventTest {
|
||||
|
||||
}
|
||||
}
|
||||
verify(pim, Mockito.times(Reason.values().length * 3)).callEvent(any());
|
||||
verify(pim, Mockito.times(Reason.values().length * 2)).callEvent(any());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user