mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-29 12:37:37 +01:00
Fixed tests to use the TextVariables
This commit is contained in:
parent
4897d8ef77
commit
884df8f07d
@ -36,6 +36,7 @@ import org.powermock.reflect.Whitebox;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.Settings;
|
||||
import us.tastybento.bskyblock.api.localization.TextVariables;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import us.tastybento.bskyblock.commands.IslandCommand;
|
||||
import us.tastybento.bskyblock.database.objects.Island;
|
||||
@ -242,7 +243,7 @@ public class IslandBanCommandTest {
|
||||
|
||||
assertTrue(ibc.execute(user, Arrays.asList("bill")));
|
||||
Mockito.verify(user).sendMessage("general.success");
|
||||
Mockito.verify(targetUser).sendMessage("commands.island.ban.owner-banned-you", "[owner]", user.getName());
|
||||
Mockito.verify(targetUser).sendMessage("commands.island.ban.owner-banned-you", TextVariables.NAME, user.getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -263,7 +264,7 @@ public class IslandBanCommandTest {
|
||||
|
||||
assertTrue(ibc.execute(user, Arrays.asList("bill")));
|
||||
Mockito.verify(user).sendMessage("general.success");
|
||||
Mockito.verify(targetUser).sendMessage("commands.island.ban.owner-banned-you", "[owner]", user.getName());
|
||||
Mockito.verify(targetUser).sendMessage("commands.island.ban.owner-banned-you", TextVariables.NAME, user.getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -28,6 +28,7 @@ import org.powermock.reflect.Whitebox;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.Settings;
|
||||
import us.tastybento.bskyblock.api.localization.TextVariables;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import us.tastybento.bskyblock.commands.IslandCommand;
|
||||
import us.tastybento.bskyblock.database.objects.Island;
|
||||
@ -280,7 +281,7 @@ public class IslandResetCommandTest {
|
||||
|
||||
// Reset
|
||||
assertTrue(irc.execute(user, new ArrayList<>()));
|
||||
Mockito.verify(user).sendMessage("commands.island.reset.confirm", "[label]", "island", "[seconds]", String.valueOf(s.getConfirmationTime()));
|
||||
Mockito.verify(user).sendMessage("commands.island.reset.confirm", TextVariables.LABEL, "island", TextVariables.NUMBER, String.valueOf(s.getConfirmationTime()));
|
||||
|
||||
// Reset confirm
|
||||
assertTrue(irc.execute(user, Arrays.asList("confirm")));
|
||||
|
@ -32,6 +32,7 @@ import org.powermock.reflect.Whitebox;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.Settings;
|
||||
import us.tastybento.bskyblock.api.localization.TextVariables;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import us.tastybento.bskyblock.commands.IslandCommand;
|
||||
import us.tastybento.bskyblock.database.objects.Island;
|
||||
@ -205,7 +206,7 @@ public class IslandUnbanCommandTest {
|
||||
|
||||
assertTrue(iubc.execute(user, Arrays.asList("bill")));
|
||||
Mockito.verify(user).sendMessage("general.success");
|
||||
Mockito.verify(targetUser).sendMessage("commands.island.unban.you-are-unbanned", "[owner]", user.getName());
|
||||
Mockito.verify(targetUser).sendMessage("commands.island.unban.you-are-unbanned", TextVariables.NAME, user.getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user