File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
main/java/com/pengrad/telegrambot
test/java/com/pengrad/telegrambot Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,8 @@ public static String next() {
1616 return "attach" + counter .incrementAndGet ();
1717 }
1818
19+ public static void reset () {
20+ counter .set (0 );
21+ }
22+
1923}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ public class AttachNameTest {
1212
1313 @ Test
1414 public void next () {
15+ AttachName .reset ();
1516 assertEquals ("attach1" , AttachName .next ());
1617 assertEquals ("attach2" , AttachName .next ());
1718 assertEquals ("attach3" , AttachName .next ());
Original file line number Diff line number Diff line change @@ -1967,4 +1967,16 @@ public void chatJoinRequest() {
19671967 assertFalse (response .isOk ());
19681968 assertEquals ("Bad Request: USER_ALREADY_PARTICIPANT" , response .description ());
19691969 }
1970+
1971+ @ Test
1972+ public void banChatSenderChat () {
1973+ BaseResponse response = bot .execute (new BanChatSenderChat (channelName , memberBot ).untilDate (123 ));
1974+ assertTrue (response .isOk ());
1975+ }
1976+
1977+ @ Test
1978+ public void unbanChatSenderChat () {
1979+ BaseResponse response = bot .execute (new UnbanChatSenderChat (channelName , memberBot ));
1980+ assertTrue (response .isOk ());
1981+ }
19701982}
You can’t perform that action at this time.
0 commit comments