Skip to content

Commit

Permalink
Fix erroneous code that got pasted in...
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Oct 21, 2023
1 parent e4836b9 commit 8d0dbcd
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -229,26 +228,6 @@ public void testCanExecuteUserStringListOfStringSamePlayer() {
verify(user).sendMessage("commands.island.team.setowner.errors.cant-transfer-to-yourself");
}

/**
* test method for {@link world.bentobox.bentobox.api.commands.island.team.islandteamsetownercommand#canexecute(world.bentobox.bentobox.api.user.user, java.lang.string, java.util.list)}.
*/
@test
public void testcanexecuteuserstringlistofstringtargetatmaxislands() {
when(im.inteam(any(), any())).thenreturn(true);
when(im.getowner(any(), any())).thenreturn(uuid);
uuid target = uuid.randomuuid();
when(pm.getuuid(anystring())).thenreturn(target);
when(im.getmembers(any(), any())).thenreturn(set.of(target));
@nullable
island island = mock(island.class);
when(im.getisland(any(), any(user.class))).thenreturn(island);

when(im.getnumberofconcurrentislands(target, world)).thenreturn(3);

assertfalse(its.canexecute(user, "", list.of("tastybento")));
verify(user).sendmessage("commands.island.team.setowner.errors.at-max");
}

/**
* Test method for {@link world.bentobox.bentobox.api.commands.island.team.IslandTeamSetownerCommand#canExecute(world.bentobox.bentobox.api.user.User, java.lang.String, java.util.List)}.
*/
Expand Down

0 comments on commit 8d0dbcd

Please sign in to comment.