java-telegram-bot-api icon indicating copy to clipboard operation
java-telegram-bot-api copied to clipboard

Bot interface for TelegramBot is extracted

Open AndreyTW opened this issue 1 year ago • 3 comments

Extract interface for better testing approach

AndreyTW avatar Jun 27 '23 06:06 AndreyTW

How does it help? This interface is not used anywhere in the library

pengrad avatar Aug 27 '23 16:08 pengrad

This interface will improve testing capabilities of project that uses your library.

Otherwise user has to find workarounds to test his own code. For example: https://github.com/AndreyTW/roman-calculator/blob/main/roman-calculator-telegram/src/main/kotlin/ru/andreyTw/romanCalculator/telegram/TelegramBotWrapper.kt

AndreyTW avatar Aug 28 '23 06:08 AndreyTW

You can extend TelegramBot class and make own TestTelegramBot

pengrad avatar Sep 23 '23 08:09 pengrad