Documentation ¶
Index ¶
- func GetHandlerParamsWithMocks(t *testing.T) (HandlerParams, *MockBag)
- type HandlerParams
- type Helper
- func (c *Helper) GetUpdatesChan(config tgbotapi.UpdateConfig) (tgbotapi.UpdatesChannel, error)
- func (c *Helper) NewMessage(chatID int64, text string) tgbotapi.MessageConfig
- func (c *Helper) NewUpdateChannel(offset int) tgbotapi.UpdateConfig
- func (c *Helper) SendMessage(msg tgbotapi.MessageConfig) error
- type MockBag
- type TelegramHandlerHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHandlerParamsWithMocks ¶
func GetHandlerParamsWithMocks(t *testing.T) (HandlerParams, *MockBag)
Types ¶
type HandlerParams ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
func (*Helper) GetUpdatesChan ¶
func (c *Helper) GetUpdatesChan(config tgbotapi.UpdateConfig) (tgbotapi.UpdatesChannel, error)
func (*Helper) NewMessage ¶
func (c *Helper) NewMessage(chatID int64, text string) tgbotapi.MessageConfig
func (*Helper) NewUpdateChannel ¶
func (c *Helper) NewUpdateChannel(offset int) tgbotapi.UpdateConfig
func (*Helper) SendMessage ¶
func (c *Helper) SendMessage(msg tgbotapi.MessageConfig) error
type MockBag ¶
type MockBag struct { Cards *mock_services.MockCards Chats *mock_services.MockChats Games *mock_services.MockGames Players *mock_services.MockPlayers Statistics *mock_services.MockStatistics Logger *mock_services.MockLogger Helper *mock_handlers.MockTelegramHandlerHelper }
type TelegramHandlerHelper ¶
type TelegramHandlerHelper interface { NewMessage(chatID int64, text string) tgbotapi.MessageConfig SendMessage(msg tgbotapi.MessageConfig) error NewUpdateChannel(offset int) tgbotapi.UpdateConfig GetUpdatesChan(config tgbotapi.UpdateConfig) (tgbotapi.UpdatesChannel, error) }
Click to show internal directories.
Click to hide internal directories.