Lowercased some command class names to better fit how they are actually working in game

This commit is contained in:
Florian CUNY 2018-10-28 10:27:01 +01:00
parent 14a3ed6792
commit 14a794a5b1
8 changed files with 27 additions and 27 deletions

View File

@ -9,9 +9,9 @@ import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.commands.ConfirmableCommand;
import world.bentobox.bentobox.api.user.User;
public class AdminClearResetsAllCommand extends ConfirmableCommand {
public class AdminClearresetsallCommand extends ConfirmableCommand {
public AdminClearResetsAllCommand(CompositeCommand parent) {
public AdminClearresetsallCommand(CompositeCommand parent) {
super(parent, "clearresetsall");
}

View File

@ -10,9 +10,9 @@ import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.util.Util;
public class AdminClearResetsCommand extends CompositeCommand {
public class AdminClearresetsCommand extends CompositeCommand {
public AdminClearResetsCommand(CompositeCommand parent) {
public AdminClearresetsCommand(CompositeCommand parent) {
super(parent, "clearresets");
}

View File

@ -18,9 +18,9 @@ import world.bentobox.bentobox.managers.RanksManager;
* @author tastybento
*
*/
public class AdminGetRankCommand extends CompositeCommand {
public class AdminGetrankCommand extends CompositeCommand {
public AdminGetRankCommand(CompositeCommand adminCommand) {
public AdminGetrankCommand(CompositeCommand adminCommand) {
super(adminCommand, "getrank");
}

View File

@ -16,9 +16,9 @@ import world.bentobox.bentobox.managers.RanksManager;
* @author tastybento
*
*/
public class AdminSetRankCommand extends CompositeCommand {
public class AdminSetrankCommand extends CompositeCommand {
public AdminSetRankCommand(CompositeCommand adminCommand) {
public AdminSetrankCommand(CompositeCommand adminCommand) {
super(adminCommand, "setrank");
}

View File

@ -7,9 +7,9 @@ import world.bentobox.bentobox.api.user.User;
import java.util.List;
import java.util.UUID;
public class AdminTeamSetOwnerCommand extends CompositeCommand {
public class AdminTeamSetownerCommand extends CompositeCommand {
public AdminTeamSetOwnerCommand(CompositeCommand parent) {
public AdminTeamSetownerCommand(CompositeCommand parent) {
super(parent, "setowner");
}

View File

@ -110,7 +110,7 @@ public class AdminClearResetsAllCommandTest {
*/
@Test
public void testExecuteCheckConfirm() {
AdminClearResetsAllCommand itl = new AdminClearResetsAllCommand(ac);
AdminClearresetsallCommand itl = new AdminClearresetsallCommand(ac);
assertFalse(itl.execute(user, itl.getLabel(), new ArrayList<>(Arrays.asList("tastybento", "bobby"))));
assertTrue(itl.execute(user, itl.getLabel(), new ArrayList<>()));
Mockito.verify(user).sendMessage(Mockito.eq("commands.confirmation.confirm"), Mockito.eq("[seconds]"), Mockito.any());

View File

@ -41,7 +41,7 @@ import world.bentobox.bentobox.managers.PlayersManager;
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({Bukkit.class, BentoBox.class, User.class })
public class AdminClearResetsCommandTest {
public class AdminClearresetsCommandTest {
private CompositeCommand ac;
private User user;
@ -119,7 +119,7 @@ public class AdminClearResetsCommandTest {
*/
@Test
public void testExecuteNoTarget() {
AdminClearResetsCommand itl = new AdminClearResetsCommand(ac);
AdminClearresetsCommand itl = new AdminClearresetsCommand(ac);
assertFalse(itl.execute(user, itl.getLabel(), new ArrayList<>()));
// Show help
Mockito.verify(user).sendMessage(Mockito.eq("commands.help.header"), Mockito.eq("[label]"), Mockito.any());
@ -130,7 +130,7 @@ public class AdminClearResetsCommandTest {
*/
@Test
public void testExecuteUnknownPlayer() {
AdminClearResetsCommand itl = new AdminClearResetsCommand(ac);
AdminClearresetsCommand itl = new AdminClearresetsCommand(ac);
String[] name = {"tastybento"};
when(pm.getUUID(Mockito.any())).thenReturn(null);
assertFalse(itl.execute(user, itl.getLabel(), Arrays.asList(name)));
@ -142,7 +142,7 @@ public class AdminClearResetsCommandTest {
*/
@Test
public void testExecutePlayerNoIsland() {
AdminClearResetsCommand itl = new AdminClearResetsCommand(ac);
AdminClearresetsCommand itl = new AdminClearresetsCommand(ac);
String[] name = {"tastybento"};
when(pm.getUUID(Mockito.any())).thenReturn(notUUID);
when(im.hasIsland(Mockito.any(), Mockito.any(UUID.class))).thenReturn(false);
@ -155,7 +155,7 @@ public class AdminClearResetsCommandTest {
String[] name = {"tastybento"};
when(pm.getUUID(Mockito.any())).thenReturn(notUUID);
AdminClearResetsCommand itl = new AdminClearResetsCommand(ac);
AdminClearresetsCommand itl = new AdminClearresetsCommand(ac);
assertTrue(itl.execute(user, itl.getLabel(), Arrays.asList(name)));
// Add other verifications
Mockito.verify(user).sendMessage("commands.admin.clearresets.cleared");

View File

@ -41,7 +41,7 @@ import world.bentobox.bentobox.managers.PlayersManager;
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({Bukkit.class, BentoBox.class, User.class })
public class AdminTeamSetOwnerCommandTest {
public class AdminTeamSetownerCommandTest {
private CompositeCommand ac;
private UUID uuid;
@ -114,21 +114,21 @@ public class AdminTeamSetOwnerCommandTest {
/**
* Test method for {@link AdminTeamSetOwnerCommand#execute(User, String, List)}.
* Test method for {@link AdminTeamSetownerCommand#execute(User, String, List)}.
*/
@Test
public void testExecuteNoTarget() {
AdminTeamSetOwnerCommand itl = new AdminTeamSetOwnerCommand(ac);
AdminTeamSetownerCommand itl = new AdminTeamSetownerCommand(ac);
assertFalse(itl.execute(user, itl.getLabel(), new ArrayList<>()));
// Show help
}
/**
* Test method for {@link AdminTeamSetOwnerCommand#execute(User, String, List)}.
* Test method for {@link AdminTeamSetownerCommand#execute(User, String, List)}.
*/
@Test
public void testExecuteUnknownPlayer() {
AdminTeamSetOwnerCommand itl = new AdminTeamSetOwnerCommand(ac);
AdminTeamSetownerCommand itl = new AdminTeamSetownerCommand(ac);
String[] name = {"tastybento"};
when(pm.getUUID(Mockito.any())).thenReturn(null);
assertFalse(itl.execute(user, itl.getLabel(), Arrays.asList(name)));
@ -136,11 +136,11 @@ public class AdminTeamSetOwnerCommandTest {
}
/**
* Test method for {@link AdminTeamSetOwnerCommand#execute(User, String, List)}.
* Test method for {@link AdminTeamSetownerCommand#execute(User, String, List)}.
*/
@Test
public void testExecutePlayerNotInTeam() {
AdminTeamSetOwnerCommand itl = new AdminTeamSetOwnerCommand(ac);
AdminTeamSetownerCommand itl = new AdminTeamSetownerCommand(ac);
String[] name = {"tastybento"};
when(pm.getUUID(Mockito.any())).thenReturn(notUUID);
when(im.getMembers(Mockito.any(), Mockito.any())).thenReturn(new HashSet<>());
@ -149,7 +149,7 @@ public class AdminTeamSetOwnerCommandTest {
}
/**
* Test method for {@link AdminTeamSetOwnerCommand#execute(User, String, List)}.
* Test method for {@link AdminTeamSetownerCommand#execute(User, String, List)}.
*/
@Test
public void testExecuteMakeLeaderAlreadyLeader() {
@ -161,13 +161,13 @@ public class AdminTeamSetOwnerCommandTest {
when(im.getTeamLeader(Mockito.any(), Mockito.eq(notUUID))).thenReturn(notUUID);
AdminTeamSetOwnerCommand itl = new AdminTeamSetOwnerCommand(ac);
AdminTeamSetownerCommand itl = new AdminTeamSetownerCommand(ac);
assertFalse(itl.execute(user, itl.getLabel(), Arrays.asList(name)));
Mockito.verify(user).sendMessage("commands.admin.team.setowner.already-owner");
}
/**
* Test method for {@link AdminTeamSetOwnerCommand#execute(User, String, List)}.
* Test method for {@link AdminTeamSetownerCommand#execute(User, String, List)}.
*/
@Test
public void testExecuteSuccess() {
@ -185,7 +185,7 @@ public class AdminTeamSetOwnerCommandTest {
members.add(notUUID);
when(im.getMembers(Mockito.any(), Mockito.any())).thenReturn(members);
AdminTeamSetOwnerCommand itl = new AdminTeamSetOwnerCommand(ac);
AdminTeamSetownerCommand itl = new AdminTeamSetownerCommand(ac);
assertTrue(itl.execute(user, itl.getLabel(), Arrays.asList(name)));
// Add other verifications
Mockito.verify(im).setOwner(Mockito.any(), Mockito.eq(user), Mockito.eq(notUUID));