use of fredboat.test.FakeContext in project FredBoat by Frederikam.
the class CommandInitializerTest method testHelpStrings.
/**
* Make sure all commands initialized in the bot provide help
*/
// @Test disabled until spring refactoring is sorted out
public void testHelpStrings() {
CommandInitializer.initCommands(null, null, null, null, null, null, null);
for (String c : CommandRegistry.getAllRegisteredCommandsAndAliases()) {
Command com = CommandRegistry.findCommand(c);
Assertions.assertNotNull(com, "Command looked up by " + c + " is null");
String help = com.help(new FakeContext(null, null, null));
Assertions.assertNotNull(help, () -> com.getClass().getName() + ".help() returns null");
Assertions.assertNotEquals("", help, () -> com.getClass().getName() + ".help() returns an empty string");
}
}
Aggregations