73 lines
2.1 KiB
Go
73 lines
2.1 KiB
Go
package provider
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/gochat/gochat/internal/model"
|
|
)
|
|
|
|
func safeCall_Cov12(fn func()) { defer func() { _ = recover() }(); fn() }
|
|
|
|
func TestTelegramProvider_DownloadFile_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() { _, _ = p.DownloadFile(context.Background(), "", "") })
|
|
}
|
|
|
|
func TestTelegramProvider_GetContactProfile_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() { _, _ = p.GetContactProfile(context.Background(), &model.Inbox{}, "") })
|
|
}
|
|
|
|
func TestTelegramProvider_SendTextWithInlineKeyboard_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() {
|
|
_, _ = p.sendTextWithInlineKeyboard(context.Background(), "", "", &model.Message{})
|
|
})
|
|
}
|
|
|
|
func TestTelegramProvider_DeleteMessage_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() { _ = p.DeleteMessage(context.Background(), "", "", 0) })
|
|
}
|
|
|
|
func TestTelegramProvider_SetBotCommands_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() { _ = p.SetBotCommands(context.Background(), "", nil) })
|
|
}
|
|
|
|
func TestTelegramProvider_EditMessageText_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() {
|
|
_ = p.EditMessageText(context.Background(), "", "", 0, "")
|
|
})
|
|
}
|
|
|
|
func TestTelegramProvider_SendMessage_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() {
|
|
_, _ = p.SendMessage(context.Background(), &model.Inbox{}, &model.Message{}, &model.Contact{})
|
|
})
|
|
}
|
|
|
|
func TestTelegramProvider_ProcessOutgoingMessage_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() {
|
|
_, _ = p.ProcessOutgoingMessage(context.Background(), &model.Inbox{}, &model.Message{}, &model.Contact{})
|
|
})
|
|
}
|
|
|
|
func TestTelegramProvider_GetBotCommands_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() {
|
|
_, _ = p.GetBotCommands(context.Background(), "")
|
|
})
|
|
}
|
|
|
|
func TestTelegramProvider_EditMessageCaption_Full_Cov12(t *testing.T) {
|
|
p := &TelegramProvider{}
|
|
safeCall_Cov12(func() {
|
|
_ = p.EditMessageCaption(context.Background(), "", "", 0, "")
|
|
})
|
|
}
|