File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
main/java/com/pengrad/telegrambot/request
test/java/com/pengrad/telegrambot Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ public SetWebhook certificate(File certificate) {
3030 return add ("certificate" , certificate );
3131 }
3232
33+ public SetWebhook maxConnections (int maxConnections ) {
34+ return add ("max_connections" , maxConnections );
35+ }
36+
3337 @ Override
3438 public boolean isMultipart () {
3539 return isMultipart ;
Original file line number Diff line number Diff line change 1414import java .util .List ;
1515import java .util .Properties ;
1616
17+ import static org .junit .Assert .assertTrue ;
18+
1719/**
1820 * stas
1921 * 5/2/16.
@@ -231,6 +233,12 @@ public void getWebhookInfo() {
231233 WebhookInfoTest .check (response .webhookInfo ());
232234 }
233235
236+ @ Test
237+ public void setWebhook () {
238+ BaseResponse response = bot .execute (new SetWebhook ().url ("https://google.com" ).maxConnections (100 ));
239+ assertTrue (response .isOk ());
240+ }
241+
234242 @ Test
235243 public void sendGame () {
236244 SendResponse response = bot .execute (new SendGame (chatId , "pengrad_test_game" ));
You can’t perform that action at this time.
0 commit comments