Search in sources :

Example 26 with FoundCommandResult

use of fr.xephi.authme.command.FoundCommandResult in project AuthMeReloaded by AuthMe.

the class HelpProviderTest method shouldNotShowAnythingForEmptyPermissions.

@Test
public void shouldNotShowAnythingForEmptyPermissions() {
    // given
    CommandDescription command = getCommandWithLabel(commands, "authme");
    FoundCommandResult result = newFoundResult(command, Collections.singletonList("authme"));
    // when
    helpProvider.outputHelp(sender, result, SHOW_PERMISSIONS);
    // then
    List<String> lines = getLines(sender);
    assertThat(lines, hasSize(1));
}
Also used : FoundCommandResult(fr.xephi.authme.command.FoundCommandResult) CommandDescription(fr.xephi.authme.command.CommandDescription) Matchers.containsString(org.hamcrest.Matchers.containsString) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Test(org.junit.Test)

Aggregations

FoundCommandResult (fr.xephi.authme.command.FoundCommandResult)26 Test (org.junit.Test)24 Matchers.containsString (org.hamcrest.Matchers.containsString)22 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)22 CommandDescription (fr.xephi.authme.command.CommandDescription)20 CommandSender (org.bukkit.command.CommandSender)6 FoundResultStatus (fr.xephi.authme.command.FoundResultStatus)1