mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-22 02:35:21 +01:00
Added test case
This commit is contained in:
parent
8ba3f034f7
commit
8240484d4f
@ -12,6 +12,7 @@ import static org.mockito.Mockito.when;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -364,4 +365,15 @@ public class AdminPurgeCommandTest {
|
||||
verify(user, Mockito.times(1)).sendMessage(any());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link world.bentobox.bentobox.api.commands.admin.purge.AdminPurgeCommand#getOldIslands(int)}
|
||||
*/
|
||||
@Test
|
||||
public void testGetOldIslands() {
|
||||
assertTrue(apc.getOldIslands(10).isEmpty());
|
||||
Island island2 = mock(Island.class);
|
||||
when(im.getIslands()).thenReturn(Set.of(island, island2));
|
||||
assertTrue(apc.getOldIslands(10).isEmpty());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user