Added more documentation on methods and tests

This commit is contained in:
kunzhang0516 2021-12-08 22:35:01 -08:00
parent f33bceaf14
commit 6d32c122cc
2 changed files with 6 additions and 0 deletions

View File

@ -239,6 +239,7 @@ public final class DefaultAbilities implements AbilityExtension {
/**
* The ability to cancel operation.
* User can use this method to cancel the current session and delete related chat.
* Usage: <code>/cancel</code>
*
* @return the ability to cancel operation

View File

@ -200,6 +200,11 @@ public class AbilityBotTest {
verify(sender, times(1)).sendDocument(any());
}
/**
* This is for TelegramBots Issue 935 test
* this test shows that TelegramLongPollingBot can cancel the session by removing map of chatID.
*/
@Test
void canCancel() {
MessageContext context = defaultContext();